Repository navigation
test(spring-boot): [Sample Tests 25] Move the Boot 4 OTel agent sample's tests - #6317
Draft
runningcode wants to merge 2 commits into
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
… 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
Draft
Draft
Draft
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Sample Tests)
main)📜 Description
Moves
sentry-samples-spring-boot-4-opentelemetry's tests intosentry-spring-boot-4, with the agent setup that #6315 and #6316 built for Boot 3:agentFixtureapp that runs in a child JVM with the built agent attached;integrationTestOtelAgentsuite, where the agent initializes Sentry;integrationTestOtelAgentWithoutAutoInittask, 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:
RestTemplateBuilderfromspring-boot-restclient;TestRestTemplatefromspring-boot-resttestclient;WebServerPortFileWriterfromspring-boot-web-server;openmodifiers, because the module applies kotlin-spring.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.
integrationTestsincludes the tasks too. The sample'sbootRunWithAgenttask stays.After a coverage audit against the sample's tests:
sample_randand deferred-sampling tests check the envelope header's trace ID, the GraphQL task query'sassigneeIdandcreatorIdchecks from test(spring-boot): [Sample Tests 9] Move the Boot 3 GraphQL tests into the module #6295, and three minutes for the app to start instead of one, as in test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests #6315: on a busy CI runner the agent's instrumentation took over a minute.💡 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?
WithoutAutoInittask.:sentry-spring-boot-4:checkpasses, and the sample still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The Boot 2 OTel agent sample.
#skip-changelog
🤖 Generated with Claude Code