Skip to content

test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests - #6316

Draft
runningcode wants to merge 3 commits into
no/boot3-otel-agent-integration-testfrom
no/boot3-otel-agent-retire-sample
Draft

runningcode wants to merge 3 commits into
no/boot3-otel-agent-integration-testfrom
no/boot3-otel-agent-retire-sample

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Ports the rest of sentry-samples-spring-boot-jakarta-opentelemetry's tests into the agent suite from #6315. They run in both init modes:

  • Cache and Metrics: the no-agent and servlet suites' tests. Sentry runs in the app's JVM, so the Metrics test can't flush it; it waits for the app's next metrics batch instead.
  • GraphQL: the agent traces each operation as one span, with the operation's name as its op and description, as the sample asserts (query GreetingQuery). So the queries are named. Errors are still tied to their transaction by trace ID.
  • Kafka coexistence: with the agent, OTel traces both sides of a message and Sentry's own SpringKafka integration stays out, as in test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests #6312. The test JVM starts an in-JVM KRaft broker next to the app and passes its address to the app.

With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. The sample's bootRunWithAgent task stays.

Both agent tasks now run 25 tests each, about 132s per mode, and Gradle runs the two modes in parallel. As in #6315, the time comes from waiting for the agent's 5-second span batches.

After a coverage audit against the sample's tests:

💡 Motivation and Context

The Boot 3 agent flavor is now fully in the module, in both init modes. The sample's auto-init=false run was likely never running in CI, because its systemTest restored from cache.

💚 How did you test it?

  • All 25 tests pass in both modes on Spring Boot 3.5.0.
  • They also pass with the catalog set to 3.2.12.
  • Expecting the wrong operation name on the project query fails that test.
  • :sentry-spring-boot-jakarta:check passes, and the sample still builds.

📝 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.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

The Boot 4 and Boot 2 OTel agent samples.

#skip-changelog

🤖 Generated with Claude Code

The agent fixture gains the Cache, Metrics, GraphQL and Kafka
endpoints, and the agent suite ports the sample's remaining tests in
both init modes. The agent traces each GraphQL operation as one span
named after it, so the queries are named. Kafka uses an in-JVM KRaft
broker that the test JVM starts next to the app.

The sample has no system tests left, so it comes off the system-test
runner, the backend workflow and the Spring Boot 3 matrix. The matrix
no longer builds the agent separately, because the suites build the
jar they attach.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 20, 2026
@sentry

sentry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

runningcode and others added 2 commits October 20, 2026 20:59
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ee and creator ids

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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