Skip to content

test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests - #6313

Draft
runningcode wants to merge 2 commits into
no/boot3-otel-noagent-integration-testfrom
no/boot4-otel-noagent-integration-test
Draft

runningcode wants to merge 2 commits into
no/boot3-otel-noagent-integration-testfrom
no/boot4-otel-noagent-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of #6312's. It ports sentry-samples-spring-boot-4-opentelemetry-noagent's tests, which match the Boot 3 no-agent sample's file for file, except that the Boot 4 sample has no Cache test. So the suite is #6312's, with these changes:

  • Boot 4's packages:
    • RestTemplateBuilder from spring-boot-restclient;
    • TestRestTemplate from spring-boot-resttestclient;
    • Jackson 3;
    • sentry-spring-7's @SentrySpan.
  • No open modifiers, because the module applies kotlin-spring.
  • No Cache test. The sample had none, and the integrationTest suite covers cache tracing.

As in #6312, the sample's MetricsSystemTest runs in this suite too.

With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 4 matrix. The matrix now runs the new suite, and integrationTests includes it too.

After a coverage audit against the sample's tests:

💡 Motivation and Context

sentry-opentelemetry-agentless-spring brings in the OpenTelemetry Spring Boot starter, which supports each Boot line separately. The module's build notes that a starter version without Boot 4 support breaks the application context. With the sample's tests gone, this suite is the only check that the starter and Sentry's OTel setup work together on Boot 4. It runs 20 tests.

💚 How did you test it?

  • All 20 tests pass on Spring Boot 4.1.0.
  • They also pass with the catalog set to 4.0.0.
  • Expecting the wrong flag on the annotation span makes the test fail.
  • :sentry-spring-boot-4:check passes.

📝 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 2 no-agent sample.

#skip-changelog

🤖 Generated with Claude Code

…the module

Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the
Boot 4 counterpart of the Boot 3 one: the app traces through the
OpenTelemetry SDK in its own JVM, set up by
sentry-opentelemetry-agentless-spring. The sample's tests were the same
as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with
Boot 4's packages and no Cache test. Its Metrics tests were copies of
the servlet ones and don't depend on tracing.

The sample has no system tests left, so it comes off the system-test
runner, the backend workflow and the Spring Boot 4 matrix, which now
runs the new suite. integrationTests includes it too.

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

…4 no-agent

Ports the tracing and GraphQL checks to the Boot 4 OpenTelemetry
no-agent suite, and runs the no-agent sample's Metrics tests there too.

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