Commit 80058bb
test(spring-boot-jakarta): [Queue Instrumentation 22] Cover spring-kafka class-absence gate
`SentryKafkaQueueConfiguration` in `SentryAutoConfiguration` gates the
Kafka BPPs on both `org.springframework.kafka.core.KafkaTemplate` and
`io.sentry.kafka.SentryKafkaProducerInterceptor` being present on the
classpath. Only the latter was covered by a test.
Add a `FilteredClassLoader(KafkaTemplate::class.java)` test that asserts
neither `SentryKafkaProducerBeanPostProcessor` nor
`SentryKafkaConsumerBeanPostProcessor` is registered when spring-kafka
is missing, even with `sentry.enable-queue-tracing=true`.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent df91d0c commit 80058bb
1 file changed
Lines changed: 14 additions & 0 deletions
File tree
- sentry-spring-boot-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
67 | 81 | | |
68 | 82 | | |
69 | 83 | | |
| |||
0 commit comments