Suppress instrumentation of exporter requests in JdkHttpSender - #8757
Draft
thswlsqls wants to merge 1 commit into
Draft
Suppress instrumentation of exporter requests in JdkHttpSender#8757thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8757 +/- ##
=========================================
Coverage 91.29% 91.29%
- Complexity 10498 10501 +3
=========================================
Files 1006 1006
Lines 28338 28340 +2
Branches 3581 3581
=========================================
+ Hits 25870 25874 +4
Misses 1675 1675
+ Partials 793 791 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pull request dashboard statusWaiting on the author · refreshed 2026-09-02 14:35 UTC Move out of draft to request review. Status above doesn't look right?
|
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.
Fixes #8755
Description
JdkHttpSender.send()withInstrumentationUtil.suppressInstrumentation(...), so the OpenTelemetry Java agent does not record the exporter's own OTLP requests as CLIENT spans.OkHttpHttpSender.send(), the otherHttpSenderimplementation, which already wraps its call the same way.Context; the agent's executor instrumentation carries it to the sending thread. The okhttp sender relies on the same mechanism when it hands the call to the dispatcher.UpstreamGrpcSender) still lacks suppression. Left for a separate PR.Testing done
JdkHttpSenderTest#send_suppressesInstrumentation: it injects aContext.taskWrapping(...)executor to stand in for the agent's context propagation and assertsshouldSuppressInstrumentationis true on the sending thread. It fails without the production change and passes with it../gradlew :exporters:sender:jdk:check— 14 tests passed.docs/apidiffschange: the class lives in aninternalpackage, which japicmp excludes.