Repository navigation
test(opentelemetry): [Sample Tests 36] Add an end-to-end test of the OTLP event linking - #6328
Draft
runningcode wants to merge 2 commits into
Draft
runningcode wants to merge 2 commits into
runningcode wants to merge 2 commits into
Conversation
OtlpEndToEndTest captures a message, a log and a metric inside an OpenTelemetry span with OpenTelemetryOtlpEventProcessor installed, and checks what reaches MockSentryServer: the event carries the span's trace and span IDs, and the log and the metric arrive. It ports the OTLP-specific part of the console OTLP sample's system test, which never checked the link. The sample's other assertions are the console sample's, which SentryEndToEndTest covers. The sample has no system test left, so it comes off the system-test runner and the backend workflow, whose base row moves to the Spring Boot 4 OTLP sample, and drops the Kotlin plugin it only needed for the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Draft
This was referenced Oct 20, 2026
Draft
Draft
Draft
Draft
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
📲 Install BuildsAndroid
|
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
OtlpEndToEndTesttosentry-opentelemetry-otlp, and retiressentry-samples-console-otlp.What the sample's test really checked. In the sample, OpenTelemetry exports spans over OTLP while everything else goes to Sentry. Its test asserted:
invocationsmetric recorded inside an OpenTelemetry span.It never checked the traces, which go over OTLP. It also never checked the one thing the module adds for events:
OpenTelemetryOtlpEventProcessorlinking an event to the current OpenTelemetry span.What the new test checks. It installs
OpenTelemetryOtlpEventProcessor, records the message, log and metric inside an OpenTelemetry span, and checks what reachesMockSentryServer:invocationsmetric arrive.The sample's other assertions are the console sample's, in the same order. #6324 ports those, and the event processor does nothing outside a span, so they aren't repeated here.
With no system test left, the sample comes off the runner and the backend workflow. The workflow's base row moves to
sentry-samples-spring-boot-4-otlp. The sample also drops its Kotlin plugin, which only the test needed.💡 Motivation and Context
OTLP users rely on events pointing to their OpenTelemetry trace. Nothing checked that end to end; now a test of under a second does.
💚 How did you test it?
:sentry-opentelemetry-otlp:checkpasses, and the sample's JAR still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
sentry-samples-spring-boot-4-otlp, the last sample with system tests.#skip-changelog
🤖 Generated with Claude Code