Repository navigation
test(spring-boot): [Sample Tests 37] Move the Boot 4 OTLP sample's tests into the module - #6329
Draft
runningcode wants to merge 2 commits into
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
📲 Install BuildsAndroid
|
runningcode
force-pushed
the
no/boot4-otlp-integration-test
branch
from
October 21, 2026 09:19
64a5df4 to
cecf1e0
Compare
Adds an integrationTestOtlp suite to sentry-spring-boot-4: the servlet app with the OpenTelemetry Spring Boot starter, set up by sentry-opentelemetry-otlp-spring, and OpenTelemetryOtlpEventProcessor. It ports the sample's tests, which were the servlet suite's without OkHttp, and keeps the log and metric attribute checks the sample had dropped. The sample's transactions came from Sentry's own tracing, which CI enabled with SENTRY_TRACES_SAMPLE_RATE, so the suite sets the sample rate the same way. A new test checks what OTLP mode is for: an error in a request carries the request's OpenTelemetry trace. Events point at that trace rather than at Sentry's transaction, so the GraphQL errors are checked next to their transactions instead of by trace ID, as the sample did. The sample has no system tests left, so it comes off the system-test runner and the backend workflow. The Spring Boot 4 matrix and integrationTests run the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oot 4 OTLP suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/boot4-otlp-integration-test
branch
from
October 21, 2026 11:27
cecf1e0 to
c8fc446
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
integrationTestOtlpsuite tosentry-spring-boot-4. It's the servlet app with the OpenTelemetry Spring Boot starter, set up bysentry-opentelemetry-otlp-spring, plus theOpenTelemetryOtlpEventProcessorthe sample registered. The suite portssentry-samples-spring-boot-4-otlp's tests.What the sample's tests really checked. Its tests are the Boot 4 servlet suite's (#6297) minus OkHttp and the log and metric attribute checks. They expect Sentry transactions, but in OTLP mode OpenTelemetry does the tracing and exports it over OTLP. Those transactions came from Sentry's own Spring tracing, which the runner switched on next to OpenTelemetry with
SENTRY_TRACES_SAMPLE_RATE=1.0. The sample'sapplication.propertiesdoesn't set a sample rate. The tests never checked the one thing OTLP mode adds for events: that they point at the OpenTelemetry trace.What the suite checks:
sentrypropagator. The log and metric attribute checks the sample had dropped pass, so they stay.traceparent, which OpenTelemetry continues andOpenTelemetryOtlpEventProcessorputs on the event.TestRestTemplate.With no system tests left, the sample comes off the runner and the backend workflow. Only the logback sample remains there, and #6268 removes it. The Spring Boot 4 matrix and
integrationTestsrun the new suite.For the reviewer: with both enabled, Sentry and OpenTelemetry each trace every request, and errors point at OpenTelemetry's trace. That's what the sample's CI run tested, so the suite keeps it. If the documented OTLP setup means Sentry tracing should stay off, the transaction tests here test a combination users shouldn't have.
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.💡 Motivation and Context
sentry-opentelemetry-otlp-springon Boot 4 now runs in the module, and a test now covers OTLP mode's event linking. The suite runs 23 tests in about 13 seconds.💚 How did you test it?
OpenTelemetryOtlpEventProcessor, only the linking test fails.:sentry-spring-boot-4:checkpasses, and the sample's JAR still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Cleanup: delete the runner, the Python mock server, the backend workflow and
sentry-system-test-support, then update the docs.#skip-changelog
🤖 Generated with Claude Code