suppress instrumentation: move to api + generic context key#6546
Merged
jack-berg merged 7 commits intoopen-telemetry:mainfrom Jul 17, 2024
Merged
suppress instrumentation: move to api + generic context key#6546jack-berg merged 7 commits intoopen-telemetry:mainfrom
jack-berg merged 7 commits intoopen-telemetry:mainfrom
Conversation
SylvainJuge
commented
Jul 2, 2024
| * | ||
| * @deprecated use {@link io.opentelemetry.context.internal.InstrumentationUtil} instead | ||
| */ | ||
| @Deprecated |
Contributor
Author
There was a problem hiding this comment.
[for reviewer] keeping this class allows to keep instrumentation agent compatible as it currently relies on it, switching to the new class location is the next step in the instrumentation agent once this has been merged and released.
LikeTheSalad
approved these changes
Jul 2, 2024
Contributor
LikeTheSalad
left a comment
There was a problem hiding this comment.
Moving the tool outside of the exporters module should also help avoid using reflection here!
…nto suppress-instrumentation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6546 +/- ##
============================================
+ Coverage 90.59% 90.61% +0.01%
- Complexity 6255 6257 +2
============================================
Files 689 690 +1
Lines 18698 18701 +3
Branches 1843 1843
============================================
+ Hits 16940 16945 +5
Misses 1201 1201
+ Partials 557 555 -2 ☔ View full report in Codecov by Sentry. |
…nto suppress-instrumentation
jack-berg
reviewed
Jul 11, 2024
Member
jack-berg
left a comment
There was a problem hiding this comment.
Just the one comment on location, but I support this.
context/src/main/java/io/opentelemetry/context/internal/InstrumentationUtil.java
Outdated
Show resolved
Hide resolved
…nto suppress-instrumentation
|
any ETA on this one ? |
jack-berg
approved these changes
Jul 15, 2024
This was referenced Jul 18, 2024
chungngoops
added a commit
to chungngoops/opentelemetry-java
that referenced
this pull request
Jul 24, 2024
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.
With #5918, the
suppress_internal_exporter_instrumentationcontext key was introduced as a way to help identify the HTTP calls made by the OTLP exporter from the ones made by the application.The name of the context key and the location of the related
InstrumentationUtilclass in the exporter make it exporter-only, which somehow blocks reusing it more broadly.Other implementations seem to favor a more generic naming, so it seems reasonable to change:
suppress_instrumentationandsuppress_http_instrumentation(definitions)otel.suppress_instrumentation(definition)My goal here is to help unblock this PR open-telemetry/opentelemetry-java-contrib#1061 : okhttp is implicitly ignored for now due to classloader, but switching to internal JDK HTTP client means we need to have explicit exclusion
Also, this should help ensure that other internal HTTP clients usages like GCP/AWS (and maybe soon Azure too) cloud resource attributes providers are consistently excluded from tracing.
There has already been an issue opened to attempt adding this officially to the spec/semantic conventions in the past (open-telemetry/opentelemetry-specification#530) but there hasn't been any progress in a while, so we can conclude that there isn't any strong need to align this across platforms for now, this could however be a welcome later improvement.