Commit 6d91bdc
fix(spring-jakarta): Guard entire span lifecycle in Kafka producer interceptor
Wrap all span operations (startChild, setData, injectHeaders, finish)
in a single try-catch so instrumentation can never break the customer's
Kafka send. The record is always returned regardless of any exception
in Sentry code.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 320e805 commit 6d91bdc
File tree
1 file changed
+14
-13
lines changed- sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/kafka
1 file changed
+14
-13
lines changedLines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | | - | |
64 | | - | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | | - | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | | - | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments