Skip to content

Don't allow signal definition to reference attributes with lower stability than the signal itself#3752

Merged
lmolkova merged 8 commits into
open-telemetry:mainfrom
lmolkova:group-stability-policy-fix
Jun 1, 2026
Merged

Don't allow signal definition to reference attributes with lower stability than the signal itself#3752
lmolkova merged 8 commits into
open-telemetry:mainfrom
lmolkova:group-stability-policy-fix

Conversation

@lmolkova

Copy link
Copy Markdown
Member

(unless attribute is opt-in)

Currently we only check stable groups, but in #3693 we marked a metric as stable leaving some of its attributes as development - #3739

Let's extend policy to cover all stability levels.

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 tightens the repository’s policy enforcement so that semantic convention signal groups (spans/metrics/events/entities, etc.) cannot reference attributes that have a lower stability than the group itself—unless those attributes are opt_in. This addresses cases where a signal was promoted but some referenced attributes remained less stable.

Changes:

  • Extend the Rego policy from “stable-only” checks to a general stability ordering check using a stability ranking map.
  • Update and expand policy tests to cover the generalized stability comparison behavior.
  • Update documentation to describe the rule at the group level, and add a changelog entry for the change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
policies/group_stability.rego Implements stability-rank comparison and adds a new exception.
policies_test/group_stability_test.rego Refactors/extends tests for the new policy behavior.
docs/general/semantic-convention-groups.md Documents the new “no lower-stability attributes unless opt_in” guidance.
.chloggen/group-stability-check.yaml Adds a changelog entry describing the enhancement.

Comment thread policies/group_stability.rego Outdated
Comment thread .chloggen/group-stability-check.yaml
Comment thread policies_test/group_stability_test.rego
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this from Untriaged to Needs More Approval in Semantic Conventions Triage Jun 1, 2026
@lmolkova
lmolkova added this pull request to the merge queue Jun 1, 2026
Merged via the queue into open-telemetry:main with commit 664d3c9 Jun 1, 2026
16 checks passed
@lmolkova
lmolkova deleted the group-stability-policy-fix branch June 1, 2026 16:22
@kamphaus kamphaus mentioned this pull request Jun 10, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants