Skip to content

Align SemconvStability with newer declarative config#18908

Open
zeitlinger wants to merge 11 commits into
open-telemetry:mainfrom
zeitlinger:gregor/semconv-stability-config-model
Open

Align SemconvStability with newer declarative config#18908
zeitlinger wants to merge 11 commits into
open-telemetry:mainfrom
zeitlinger:gregor/semconv-stability-config-model

Conversation

@zeitlinger

@zeitlinger zeitlinger commented Jun 5, 2026

Copy link
Copy Markdown
Member

Teach SemconvStability to read the newer declarative general.stability_opt_in_list setting, support per-domain declarative semconv config for db, code, rpc, and messaging, and move preview config for service.peer, rpc, and messaging to java.common instead of general (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. The java.common.v3_preview=true / otel.semconv-stability.v3-preview=true setting affects only fallback/default selection for non-messaging domains; it does not override explicit per-domain semconv.version / dual_emit config.

Fixes #18907, #18933.

@zeitlinger zeitlinger force-pushed the gregor/semconv-stability-config-model branch 2 times, most recently from 20a9cf4 to 309f180 Compare June 8, 2026 10:54
@zeitlinger zeitlinger marked this pull request as ready for review June 8, 2026 11:39
@zeitlinger zeitlinger requested a review from a team as a code owner June 8, 2026 11:39
Copilot AI review requested due to automatic review settings June 8, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_list and refactor selection into a SemconvSelection helper.
  • Add per-domain declarative semconv selection support (db, code, rpc, messaging) via {domain}.semconv.version and {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.

@zeitlinger zeitlinger force-pushed the gregor/semconv-stability-config-model branch from eeebbc5 to ad419e0 Compare June 8, 2026 16:52
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>
@zeitlinger zeitlinger force-pushed the gregor/semconv-stability-config-model branch from ad419e0 to 5e90e21 Compare June 9, 2026 08:48
@trask trask added this to the v2.29.0 milestone Jun 12, 2026
…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>
@zeitlinger

Copy link
Copy Markdown
Member Author

@trask I've expanded this PR to include #18933 - and added an overview table where values are read from

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide how service.peer semconv should map to declarative config Align SemconvStability with newer declarative semconv config model

3 participants