Skip to content

fix(test): [Queue Instrumentation 16] Enable Kafka profile in system runner#5291

Draft
adinauer wants to merge 2 commits intofeat/queue-instrumentation-kafka-console-samplefrom
fix/queue-instrumentation-kafka-system-test-runner
Draft

fix(test): [Queue Instrumentation 16] Enable Kafka profile in system runner#5291
adinauer wants to merge 2 commits intofeat/queue-instrumentation-kafka-console-samplefrom
fix/queue-instrumentation-kafka-system-test-runner

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Apr 14, 2026

PR Stack (Queue Instrumentation)


📜 Description

Finalize the top Kafka stack PR with the Spring Boot Jakarta review fix.

Changes:

  • define module lists for Kafka broker requirements and Kafka Spring profile requirements
  • start Kafka for modules that require it
  • set SPRING_PROFILES_ACTIVE=kafka for modules that need Kafka endpoints enabled
  • require io.sentry.kafka.SentryKafkaProducerInterceptor before activating Spring Boot Jakarta Kafka queue auto-configuration
  • add a regression test proving Kafka bean post-processors are skipped when sentry-kafka is absent from the classpath

💡 Motivation and Context

Kafka queue system tests for sentry-samples-spring-boot-jakarta were running without the
kafka profile, so /kafka endpoints were not active and tests failed with 404s.

This PR also fixes the late stack regression where Spring Boot Jakarta queue auto-configuration
could activate without the optional sentry-kafka module being present.

💚 How did you test it?

  • Ran ./gradlew spotlessApply apiDump
  • Ran ./gradlew :sentry-spring-boot-jakarta:test --tests='*SentryKafkaAutoConfigurationTest'
  • Verified the system runner script changes and Spring Boot Jakarta Kafka auto-config regression test

📝 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

#skip-changelog

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

Make the system test runner configure Kafka requirements by module.

Start Kafka and set SPRING_PROFILES_ACTIVE=kafka for modules that need
Kafka-backed Spring endpoints so queue system tests run with the expected
routing and broker configuration.

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

github-actions bot commented Apr 14, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@sentry
Copy link
Copy Markdown

sentry bot commented Apr 14, 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

Require the sentry-kafka producer interceptor class before activating
Spring Boot Jakarta queue auto-configuration. This keeps sentry-kafka
optional for customers who only use the starter without Kafka queue
tracing support on the classpath.

Add a regression test that hides sentry-kafka from the classloader and
verifies the Kafka bean post-processors are skipped instead of being
registered.

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

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 344.28 ms 405.08 ms 60.80 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/queue-instrumentation-kafka-console-sample

Startup times

Revision Plain With Sentry Diff
fd0e9aa 314.83 ms 352.65 ms 37.81 ms

App size

Revision Plain With Sentry Diff
fd0e9aa 0 B 0 B 0 B

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