Skip to content

feat(spring): [Queue Instrumentation 40] Add Spring Boot 4 Kafka tracing#5348

Open
adinauer wants to merge 2 commits intofix/kafka-system-test-stale-containerfrom
feat/queue-instrumentation-spring-boot-4
Open

feat(spring): [Queue Instrumentation 40] Add Spring Boot 4 Kafka tracing#5348
adinauer wants to merge 2 commits intofix/kafka-system-test-stale-containerfrom
feat/queue-instrumentation-spring-boot-4

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Apr 29, 2026

PR Stack (Queue Instrumentation)


📜 Description

Ports the Spring Boot 3 Kafka queue tracing stack changes to Spring Boot 4 as one PR.

This adds Spring Kafka support to the Spring 7 module, wires it into the Spring Boot 4 auto-configuration, and adds Boot 4 sample/system-test coverage for the regular, OTel agent, and OTel no-agent samples.

💡 Motivation and Context

The queue instrumentation stack added Kafka tracing for Spring Boot 3. Spring Boot 4 uses the Spring 7 module, so it needs the same Kafka producer/consumer bean post-processors and auto-configuration in the Boot 4 integration.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew :sentry-spring-7:test --tests '*Kafka*' :sentry-spring-boot-4:test --tests '*Kafka*'
  • ./gradlew :sentry-samples:sentry-samples-spring-boot-4:compileJava :sentry-samples:sentry-samples-spring-boot-4:compileTestKotlin :sentry-samples:sentry-samples-spring-boot-4-opentelemetry:compileJava :sentry-samples:sentry-samples-spring-boot-4-opentelemetry:compileTestKotlin :sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent:compileJava :sentry-samples:sentry-samples-spring-boot-4-opentelemetry-noagent:compileTestKotlin
  • python3 -m py_compile test/system-test-runner.py

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

None.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Port the Spring Boot 3 Kafka queue tracing support to the Spring 7 and Spring Boot 4 modules.

Add Spring Kafka bean post-processors, Boot 4 auto-configuration, and matching sample system-test coverage.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 11a211c

This was referenced Apr 29, 2026
@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 29, 2026

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.37.1 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions
Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 323.42 ms 368.73 ms 45.31 ms
Size 0 B 0 B 0 B

@adinauer adinauer marked this pull request as ready for review April 29, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant