Repository navigation
Commit 872a129
committed
Fix: propagate commit exceptions instead of swallowing them in BlockFailureReporter
Remove the catch(Exception) around brf.tryCommitBlockingResponse() in
tryCommitAndReport() so it matches the Netty reference implementation
(PR #12316), which only branches on the boolean return value.
Several call sites (CommitActionInstrumentation in 5.5/7.0,
ParsePartsInstrumentation, ParsedBodyParametersInstrumentation) rely on
their enclosing advice's suppress = Throwable.class to abort the whole
method when the commit throws, gating success-path side effects (closing
the connection, injecting a BlockingException, marking the segment
effectively blocked). Swallowing the exception inside tryCommitAndReport
made those side effects run unconditionally even when nothing was
actually committed to the client. Removing the catch restores the
pre-existing control flow; exception-based commit failures are now a
known gap not reported to block_failure telemetry, same as Netty.
Addresses Codex review comment on PR #12493.1 parent 3d3b9bb commit 872a129
1 file changed
Lines changed: 12 additions & 12 deletions
File tree
- dd-java-agent/instrumentation/tomcat/tomcat-common/src/main/java/datadog/trace/instrumentation/tomcat
Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| |||
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | | - | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments