Skip to content

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

Draft
runningcode wants to merge 2 commits into
no/boot3-otel-agent-retire-samplefrom
no/boot4-otel-agent-integration-test
Draft

runningcode wants to merge 2 commits into
no/boot3-otel-agent-retire-samplefrom
no/boot4-otel-agent-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Moves sentry-samples-spring-boot-4-opentelemetry's tests into sentry-spring-boot-4, with the agent setup that #6315 and #6316 built for Boot 3:

  • an agentFixture app that runs in a child JVM with the built agent attached;
  • the integrationTestOtelAgent suite, where the agent initializes Sentry;
  • the integrationTestOtelAgentWithoutAutoInit task, where the Spring Boot starter does.

The sample's tests match the Boot 3 agent sample's file for file. So the fixture and the tests are the Boot 3 ones, with these changes:

  • Boot 4's packages:
    • RestTemplateBuilder from spring-boot-restclient;
    • TestRestTemplate from spring-boot-resttestclient;
    • WebServerPortFileWriter from spring-boot-web-server;
    • Jackson 3.
  • Boot 4's starters, including the Kafka, RestClient and WebClient ones the app needs.
  • No open modifiers, because the module applies kotlin-spring.
  • The starter's SDK name, sentry.java.spring-boot-4.

With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 4 matrix. The matrix now runs both agent tasks and no longer builds the agent separately. integrationTests includes the tasks too. The sample's bootRunWithAgent task stays.

After a coverage audit against the sample's tests:

💡 Motivation and Context

The Boot 4 agent flavor, in both init modes, now runs in the module. Each task runs 25 tests in about 132s, and the two run in parallel.

💚 How did you test it?

  • All 25 tests pass in both modes on Spring Boot 4.1.0.
  • They also pass with the catalog set to 4.0.0.
  • Expecting the wrong starter SDK name fails only the WithoutAutoInit task.
  • :sentry-spring-boot-4: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 2 OTel agent sample.

#skip-changelog

🤖 Generated with Claude Code

… module

Adds the agent setup to sentry-spring-boot-4: an agentFixture app that
runs in a child JVM with the built agent attached, and the
integrationTestOtelAgent suite with its integrationTestOtelAgentWithoutAutoInit
task. The sample's tests were the same as the Boot 3 agent sample's, so
the fixture and tests are the Boot 3 ones with Boot 4's packages and
starters.

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 both agent tasks and no longer builds the agent separately.
integrationTests includes them 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

…oot 4 agent

Ports the tracing and GraphQL checks to the Boot 4 agent suite, and
gives the app three minutes to start, as for Boot 3.

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