Repository navigation
test(spring-boot): [Sample Tests 26] Move the Boot 2 OTel agent sample's tests - #6318
Draft
runningcode wants to merge 3 commits into
Draft
runningcode wants to merge 3 commits into
runningcode wants to merge 3 commits into
Conversation
… module Adds the agent setup to sentry-spring-boot, as in the Boot 3 and 4 modules. The sample's tests were the Boot 3 agent sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the other Boot 2 suites. The shared app has to start on Boot versions without Kafka support, so the Kafka test starts an app of its own with the kafka profile and an in-JVM broker. AgentApp becomes a class for that, with the shared instance in its companion. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 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
Draft
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oot 2 agent Ports the tracing and GraphQL checks to the Boot 2 agent suite, and gives the app three minutes to start, as for Boot 3 and 4. 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-opentelemetry's tests intosentry-spring-boot. It adds the agent setup from #6315 and #6317: anagentFixtureapp, theintegrationTestOtelAgentsuite and theintegrationTestOtelAgentWithoutAutoInittask.The sample's tests are the Boot 3 agent sample's minus Cache and RestClient (Boot 2 has no RestClient). So the fixture and tests are #6316's, with the Boot 2 changes the other Boot 2 suites (#6299, #6314) already make:
Kafka gets an app of its own. The shared app has to start on Boot versions without Kafka support. So the Kafka test starts its own broker (spring-kafka 2.8's, with ZooKeeper) and a second fixture app with the
kafkaprofile. This is the agent version of the separate Kafka context in #6300 and #6314.AgentAppbecomes a class for this, with the shared instance in its companion. The base class'sappis the shared one unless a test overrides it.The sample only checked the project query span's op. The full op and description check passes on Boot 2 too, as it does on 3 and 4.
With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 2 matrix. The matrix now runs both agent tasks and no longer builds the agent separately.
integrationTestsincludes the tasks too.This was the last sample with the agent. All three Boot lines now test the agent in both init modes.
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 2 agent flavor now runs in the module in both init modes. Each task runs 22 tests in about 112s, or 15 below Boot 2.7.
💚 How did you test it?
WithoutAutoInittask.:sentry-spring-boot:checkpasses, and the sample still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The Spring WAR samples (
sentry-spring,sentry-spring-jakarta,sentry-spring-7).#skip-changelog
🤖 Generated with Claude Code