test(samples): [Queue Instrumentation 28] Cover OTel Jakarta Kafka coexistence in CI#5324
Draft
adinauer wants to merge 1 commit intofix/queue-instrumentation-kafka-record-interceptor-thread-statefrom
Conversation
Enable the Kafka Spring profile (and Kafka broker) for the two OTel Spring
Boot 3 Jakarta sample modules in the system-test runner, and add a Kafka
system test in each that produces a message and asserts no Sentry-style
`queue.publish` / `queue.process` span/transaction is emitted.
SentryKafkaQueueConfiguration is guarded by
@ConditionalOnMissingClass("io.sentry.opentelemetry.SentryAutoConfigurationCustomizerProvider"),
so the Sentry Kafka bean post-processors must not be wired when the Sentry
OTel integration is present. The new assertions lock that suppression into
CI for both the agent and noagent OTel Jakarta samples.
Addresses review finding F-011.
This was referenced Apr 22, 2026
Draft
Draft
Draft
📲 Install BuildsAndroid
|
8 tasks
adinauer
added a commit
that referenced
this pull request
Apr 22, 2026
…sion fixture The OTel Jakarta sample Kafka configs intentionally set `sentry.enable-queue-tracing=true` so the coexistence system test (`KafkaOtelCoexistenceSystemTest`, added in PR #5324) can assert that Sentry's Spring Kafka auto-config (`SentryKafkaQueueConfiguration`) stays suppressed even when the customer explicitly opts in. Add a comment to each `application-kafka.properties` explaining the deliberate choice and link it to the test, so the property does not read as a copy/paste trap for customers. Also extend the test KDoc to call out the fixture. #skip-changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Queue Instrumentation)
📜 Description
Enable Kafka-profile CI coverage for the OTel Spring Boot 3 Jakarta sample variants and assert the intended OTel coexistence behavior end-to-end.
sentry-samples-spring-boot-jakarta-opentelemetryandsentry-samples-spring-boot-jakarta-opentelemetry-noagentto bothKAFKA_BROKER_REQUIRED_MODULESandKAFKA_PROFILE_REQUIRED_MODULESintest/system-test-runner.pyso they start with--spring.profiles.active=kafkaand a Kafka broker in CI.KafkaOtelCoexistenceSystemTestin each OTel Jakarta sample that produces a Kafka message end-to-end and asserts no Sentry-stylequeue.publishspan orqueue.processtransaction is emitted.💡 Motivation and Context
SentryKafkaQueueConfigurationis guarded by@ConditionalOnMissingClass("io.sentry.opentelemetry.SentryAutoConfigurationCustomizerProvider"), so the Sentry Kafka bean post-processors are intentionally not wired when the Sentry OTel integration is present. Previously the OTel Jakarta samples were part of the backend system-test matrix but never ran with the Kafka profile active, so the shipped OTel + Kafka coexistence contract had no end-to-end guardrail in CI. Regressions that re-enabled Sentry's Kafka interceptors in OTel mode (or otherwise broke the suppression) could ship unnoticed.Addresses review finding F-011.
💚 How did you test it?
./gradlew :sentry-samples:sentry-samples-spring-boot-jakarta-opentelemetry:compileTestKotlin :sentry-samples:sentry-samples-spring-boot-jakarta-opentelemetry-noagent:compileTestKotlin— new system tests compile cleanly../gradlew spotlessApply apiDump— formatting applied, no API changes.python3 -c "import ast; ast.parse(open('test/system-test-runner.py').read())"— runner still parses.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog