Skip to content

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

Open
runningcode wants to merge 2 commits into
mainfrom
no/boot4-otel-agent-integration-test
Open

runningcode wants to merge 2 commits into
mainfrom
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. 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

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.1 (1) release

⚙️ sentry-android Build Distribution Settings

@runningcode
runningcode force-pushed the no/boot3-otel-agent-retire-sample branch from f1279e1 to c57bdae Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch from 55007b3 to 82f52fb Compare October 22, 2026 16:02
@runningcode
runningcode force-pushed the no/boot3-otel-agent-retire-sample branch from c57bdae to 6c23915 Compare October 23, 2026 08:24
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch 3 times, most recently from 9339a3c to a8e9846 Compare October 23, 2026 09:35
@runningcode
runningcode force-pushed the no/boot3-otel-agent-retire-sample branch from 28c2ef9 to 9862b0e Compare October 23, 2026 11:51
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch 2 times, most recently from 65720b4 to 890c12d Compare October 23, 2026 12:48
@runningcode
runningcode force-pushed the no/boot3-otel-agent-retire-sample branch from 9862b0e to 626cc3c Compare October 23, 2026 12:48
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch from 890c12d to 98681ee Compare October 23, 2026 13:02
@runningcode
runningcode force-pushed the no/boot3-otel-agent-retire-sample branch from 36b131a to d41cdb9 Compare October 23, 2026 13:53
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch from 98681ee to c678ae2 Compare October 23, 2026 13:53
@runningcode
runningcode marked this pull request as ready for review October 23, 2026 14:15
Base automatically changed from no/boot3-otel-agent-retire-sample to no/boot3-otel-agent-integration-test October 23, 2026 14:35
Base automatically changed from no/boot3-otel-agent-integration-test to no/boot2-otel-noagent-integration-test October 23, 2026 14:35
Base automatically changed from no/boot2-otel-noagent-integration-test to no/boot4-otel-noagent-integration-test October 23, 2026 14:36
Base automatically changed from no/boot4-otel-noagent-integration-test to no/boot3-otel-noagent-integration-test October 23, 2026 14:36
Base automatically changed from no/boot3-otel-noagent-integration-test to no/boot2-webflux-integration-test October 23, 2026 14:36
Base automatically changed from no/boot2-webflux-integration-test to no/boot4-webflux-integration-test October 23, 2026 14:37
Base automatically changed from no/boot4-webflux-integration-test to no/boot3-webflux-integration-test October 23, 2026 14:37
Base automatically changed from no/boot3-webflux-integration-test to no/delete-log4j2-boot-system-tests October 23, 2026 14:38
Base automatically changed from no/delete-log4j2-boot-system-tests to main October 23, 2026 15:08
… 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.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@runningcode
runningcode force-pushed the no/boot4-otel-agent-integration-test branch from c678ae2 to 193b6f9 Compare October 23, 2026 15:10

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