Add programmatic span suppression configuration#19180
Open
trask wants to merge 11 commits into
Open
Conversation
trask
commented
Jul 10, 2026
Pull request dashboard statusStatus last refreshed: 2026-07-27 01:50:34 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. |
trask
commented
Jul 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds programmatic span suppression configuration for library instrumentation.
Changes:
- Adds
Experimental.setSpanSuppressionStrategy(...). - Implements configuration precedence and deprecation warning.
- Adds tests and migration notes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Experimental.java |
Exposes the programmatic setter. |
InstrumenterBuilder.java |
Resolves suppression configuration and deprecated fallback. |
SpanSuppressionStrategyTest.java |
Tests programmatic precedence and property reading. |
CHANGELOG.md |
Documents deprecation and migration. |
trask
commented
Jul 10, 2026
trask
marked this pull request as ready for review
July 10, 2026 17:49
…an-suppression-config # Conflicts: # instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java # instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/SemconvStability.java
…an-suppression-config # Conflicts: # CHANGELOG.md # instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java
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.
Overview
Add
Experimental.setSpanSuppressionStrategy(...)so library instrumentation can configure span suppression programmatically.Configuration precedence is:
otel.instrumentation.experimental.span-suppression-strategysystem propertysemconvstrategyThe system property now logs a deprecation warning, is ignored when v3 preview is enabled, and is scheduled for removal in 3.0.
Migration
Replace:
with either:
or the equivalent declarative instrumentation configuration.
Testing
./gradlew :instrumentation-api:test --tests "io.opentelemetry.instrumentation.api.instrumenter.SpanSuppressionStrategyTest"./gradlew :instrumentation-api:spotlessJavaCheck :instrumentation-api:compileTestJava