Repository navigation
test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests - #6312
Draft
runningcode wants to merge 3 commits into
Draft
runningcode wants to merge 3 commits into
runningcode wants to merge 3 commits into
Conversation
This was referenced Oct 20, 2026
Draft
Draft
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
runningcode
force-pushed
the
no/boot3-otel-noagent-integration-test
branch
from
October 21, 2026 09:19
b66abb3 to
72a8f83
Compare
runningcode
force-pushed
the
no/boot2-webflux-integration-test
branch
from
October 21, 2026 09:19
384e41a to
4aa5a32
Compare
…the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. integrationTests includes it too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nt suite 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
force-pushed
the
no/boot3-otel-noagent-integration-test
branch
from
October 21, 2026 11:27
72a8f83 to
99017bf
Compare
runningcode
force-pushed
the
no/boot2-webflux-integration-test
branch
from
October 21, 2026 11:27
4aa5a32 to
38f020e
Compare
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
Adds an
integrationTestOtelNoAgentsuite tosentry-spring-boot-jakarta. Here the app traces through the OpenTelemetry SDK in its own JVM, set up bysentry-opentelemetry-agentless-spring, rather than through the Java agent. The suite portssentry-samples-spring-boot-jakarta-opentelemetry-noagent's tests:@WithSpanannotation, the OTel API and the Sentry API, each with its own feature flags;dbspan and the profile;sentry-trace.Query.tasksspan, as the sample does.auto.opentelemetry). Sentry's ownSpringKafkaintegration stays out. The consumer transaction is tied to the producer's trace.The sample's
MetricsSystemTestwas a copy of the servlet one. It runs in this suite too, so its assertions also hold with OpenTelemetry handling the tracing.Two problems the port surfaced:
TestRestTemplateSpring Boot provides is a bean in the app's context, so the OTel starter instruments it. It then replaced thesentry-trace/baggageheaders the tests sent with a new trace of its own, and every trace-continuation test failed. The suite uses aTestRestTemplatebuilt outside the context instead. This is the same reason the agent tests run the app in a child JVM.BatchSpanProcessorwith the default 5-second schedule, which isn't configurable, so every test waited that long.MockSentryServergets abeforeEachCheckhook that runs before each check while waiting. This suite uses it to flush the tracer provider, which took its test time from about 112s to 8s.assertNoEnveloperuns the hook too, so negative checks still mean something.With no system tests left, the sample comes off the runner, the backend workflow and the Spring Boot 3 matrix. The matrix now runs the new suite, and
integrationTestsincludes it too.After a coverage audit against the sample's tests:
sample_randand deferred-sampling tests check the envelope header's trace ID, and the GraphQL task query'sassigneeIdandcreatorIdchecks from test(spring-boot): [Sample Tests 9] Move the Boot 3 GraphQL tests into the module #6295, and restores the Metrics tests in this suite.💡 Motivation and Context
sentry-opentelemetry-agentless-springhas no tests of its own, so this flavor is its only coverage. The suite runs 22 tests.💚 How did you test it?
MockSentryServerTestcovers the new hook.:sentry-test-support:checkand:sentry-spring-boot-jakarta:checkpass.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The Boot 4 and Boot 2 no-agent samples.
#skip-changelog