Align SemconvStability with newer declarative config#18908
Open
zeitlinger wants to merge 11 commits into
Open
Conversation
20a9cf4 to
309f180
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates SemconvStability to recognize the newer declarative config model for semantic convention stability selection, including parsing general.stability_opt_in_list, supporting per-domain *.semconv settings, and adding unit tests to validate selection behavior and precedence.
Changes:
- Add parsing for declarative
stability_opt_in_listand refactor selection into aSemconvSelectionhelper. - Add per-domain declarative semconv selection support (
db,code,rpc,messaging) via{domain}.semconv.versionand{domain}.semconv.dual_emit. - Add focused unit tests for parsing and precedence/selection behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/internal/SemconvStability.java | Refactors semconv stability resolution to incorporate newer declarative config and per-domain selection. |
| instrumentation-api/src/test/java/io/opentelemetry/instrumentation/api/internal/SemconvStabilityTest.java | Adds unit tests covering parsing and selection precedence across declarative/legacy/flat config paths. |
eeebbc5 to
ad419e0
Compare
Layered on top of open-telemetry#18936: - New schema: <domain>.semconv.version (0/1) + dual_emit - New top-level stability_opt_in_list config - Precedence: domain schema > stability list > existing legacy fallback Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
ad419e0 to
5e90e21
Compare
…etry#18933 service.peer/rpc/messaging are not yet stable, so their declarative config belongs under java.common.semconv_stability.preview rather than general. System property otel.semconv-stability.preview is unchanged. Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Member
Author
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.
Teach
SemconvStabilityto read the newer declarativegeneral.stability_opt_in_listsetting, support per-domain declarative semconv config fordb,code,rpc, andmessaging, and movepreviewconfig for service.peer, rpc, and messaging tojava.commoninstead ofgeneral(closes #18933). This also adds focused unit tests for selection precedence and parsing logic.Config precedence is: per-domain
general.<domain>.semconv.*>general.stability_opt_in_list> fallback. Thejava.common.v3_preview=true/otel.semconv-stability.v3-preview=truesetting affects only fallback/default selection for non-messaging domains; it does not override explicit per-domainsemconv.version/dual_emitconfig.Fixes #18907, #18933.