Skip to content

test(samples): [Queue Instrumentation 6] Add Kafka queue system tests#5260

Draft
adinauer wants to merge 3 commits intofeat/queue-instrumentation-autoconfigfrom
feat/queue-instrumentation-e2e
Draft

test(samples): [Queue Instrumentation 6] Add Kafka queue system tests#5260
adinauer wants to merge 3 commits intofeat/queue-instrumentation-autoconfigfrom
feat/queue-instrumentation-e2e

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Apr 2, 2026

PR Stack (Queue Instrumentation)


📜 Description

Add end-to-end system tests for Kafka queue instrumentation in the Spring Boot 3 sample app:

  • KafkaQueueSystemTest with tests for:
    • Producer endpoint creates queue.publish span
    • Consumer creates queue.process transaction
    • Distributed tracing (producer and consumer share same trace)
    • Messaging attributes on publish span and process transaction
  • produceKafkaMessage helper added to RestTestClient
  • sentry.enable-queue-tracing=true enabled in the kafka profile properties

Requires a running Kafka broker at localhost:9092 and the sample app started with --spring.profiles.active=kafka.

💡 Motivation and Context

E2E system tests validate the full queue instrumentation pipeline from producer through consumer.

💚 How did you test it?

Ran system tests against the Spring Boot 3 sample app with a local Kafka broker.

📝 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

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

Add KafkaQueueSystemTest with e2e tests for:
- Producer endpoint creates queue.publish span
- Consumer creates queue.process transaction
- Distributed tracing (producer and consumer share same trace)
- Messaging attributes on publish span and process transaction

Also add produceKafkaMessage to RestTestClient and enable
sentry.enable-queue-tracing in the kafka profile properties.

Requires a running Kafka broker at localhost:9092 and the sample app
started with --spring.profiles.active=kafka.

Co-Authored-By: Claude <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 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).


New Features ✨

Spring Jakarta

  • [Queue Instrumentation 4] Add Kafka consumer instrumentation by adinauer in #5255
  • [Queue Instrumentation 3] Add Kafka producer instrumentation by adinauer in #5254

Other

  • (core) [Queue Instrumentation 1] Add enableQueueTracing option and messaging span data conventions by adinauer in #5250
  • (samples) [Queue Instrumentation 2] Add Kafka to Spring Boot 3 sample app by adinauer in #5253
  • (spring-boot-jakarta) [Queue Instrumentation 5] Add Kafka queue auto-configuration by adinauer in #5256
  • Add strict trace continuation support by giortzisg in #5136
  • Sync file attachments to native by bitsandfoxes in #5211

Internal Changes 🔧

Deps

  • Bump requests from 2.32.4 to 2.33.0 in the uv group across 1 directory by dependabot in #5237
  • Bump github/codeql-action from 4.32.6 to 4.35.1 by dependabot in #5243

Other

  • (samples) [Queue Instrumentation 6] Add Kafka queue system tests by adinauer in #5260
  • Add THIRD_PARTY_NOTICES.md for vendored third-party code by markushi in #5186

🤖 This preview updates automatically when you update the PR.

adinauer added 2 commits April 2, 2026 07:54
Force-pushing a stack branch can cause GitHub to auto-merge or
auto-close other PRs in the stack. Add explicit guidance to never
use --force, --force-with-lease, or amend+push on stack branches.
@sentry
Copy link
Copy Markdown

sentry bot commented Apr 2, 2026

Sentry Build Distribution

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 312.65 ms 367.12 ms 54.47 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/queue-instrumentation-autoconfig

Startup times

Revision Plain With Sentry Diff
25629e3 325.13 ms 383.40 ms 58.27 ms

App size

Revision Plain With Sentry Diff
25629e3 0 B 0 B 0 B

Previous results on branch: feat/queue-instrumentation-e2e

Startup times

Revision Plain With Sentry Diff
766d2f5 356.70 ms 418.39 ms 61.69 ms
7e898af 367.28 ms 426.94 ms 59.66 ms

App size

Revision Plain With Sentry Diff
766d2f5 0 B 0 B 0 B
7e898af 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