Skip to content

v2: Support requirement levels on public v2 groups#1584

Merged
lmolkova merged 4 commits into
open-telemetry:mainfrom
lmolkova:attr-levels-on-public-groups
Jul 16, 2026
Merged

v2: Support requirement levels on public v2 groups#1584
lmolkova merged 4 commits into
open-telemetry:mainfrom
lmolkova:attr-levels-on-public-groups

Conversation

@lmolkova

Copy link
Copy Markdown
Member

Public v2 attribute groups now keep per-attribute requirement_level on their refs in the resolved and materialized schemas; internal groups and v1 are unaffected.

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 the v2 resolved/materialized schema model so public v2 attribute groups preserve per-attribute requirement_level on their attribute references, and threads that value through generation, resolver import logic, fixtures, and tests.

Changes:

  • Introduce v2 public attribute-group attribute reference/value wrappers (AttributeGroupAttributeRef / AttributeGroupAttribute) that carry requirement_level.
  • Propagate group-specific requirement_level through semconv generation, forge materialization, and dependency importing (with updated tests/fixtures).
  • Update v2 JSON schemas and schema documentation to reflect the new attribute-group attribute reference shape.

Reviewed changes

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

Show a summary per file
File Description
schemas/semconv.resolved.v2.json Resolved v2 schema: attribute-group attributes[] now uses an object ref that includes requirement_level.
schemas/semconv.materialized.v2.json Materialized v2 schema: attribute-group attributes[] now includes requirement_level alongside attribute fields.
schemas/semconv-schemas.md Docs updated to describe the new attribute-group attribute reference shape.
crates/weaver_semconv_gen/src/v2.rs Generator updated to emit attribute-group attributes with group-specific requirement_level.
crates/weaver_resolver/src/dependency.rs Dependency import path updated to preserve per-ref requirement_level when importing v2 public attribute groups; tests updated accordingly.
crates/weaver_resolver/data/registry-test-v2-5-published/registry/main.yaml Test registry updated to author a non-default requirement_level on an attribute-group ref.
crates/weaver_resolver/data/registry-test-v2-5-published/published/resolved_schema.yaml Updated published resolved-schema fixture to include { base, requirement_level } shape.
crates/weaver_resolver/data/registry-test-v2-5-published/expected-schema.yaml Updated expected schema fixture to include { base, requirement_level } shape.
crates/weaver_resolver/data/registry-test-published-2/published/resolved_schema.yaml Updated published resolved-schema fixture to include { base, requirement_level } shape.
crates/weaver_resolved_schema/src/v2/mod.rs v1→v2 conversion updated so public attribute-group refs carry requirement_level; new test added.
crates/weaver_resolved_schema/src/v2/attribute_group.rs Resolved-schema v2 attribute-group model updated so attribute refs include requirement_level.
crates/weaver_forge/src/v2/registry.rs Forge materialization updated to carry per-ref requirement_level into materialized attribute-group attributes.
crates/weaver_forge/src/v2/attribute_group.rs Forge v2 attribute-group model updated so attributes carry requirement_level.
CHANGELOG.md Adds an Unreleased entry for this behavior change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread schemas/semconv.resolved.v2.json
Comment thread schemas/semconv.materialized.v2.json
Comment thread crates/weaver_resolved_schema/src/v2/attribute_group.rs Outdated
Comment thread crates/weaver_forge/src/v2/attribute_group.rs Outdated
Comment thread schemas/semconv-schemas.md Outdated
Comment thread CHANGELOG.md Outdated
@opentelemetry-pr-dashboard

Copy link
Copy Markdown

This PR has review comments. Review suggestions, whether from maintainers or automated reviewers, aren't always correct or required. Please evaluate each comment on its merits, then make sure each thread has a clear outcome.

For example, link to the commit if you applied a suggestion, explain why it wasn't applied, or ask a follow-up question.

Automation flags a PR for human review once every review thread has a reply or is marked as resolved.

Status across open PRs is visible on the pull request dashboard.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.1%. Comparing base (2d53b1a) to head (6cd814a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_forge/src/v2/registry.rs 88.8% 1 Missing ⚠️
crates/weaver_semconv_gen/src/v2.rs 90.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1584     +/-   ##
=======================================
- Coverage   81.1%   81.1%   -0.1%     
=======================================
  Files        130     130             
  Lines      11514   11519      +5     
=======================================
+ Hits        9347    9349      +2     
- Misses      2167    2170      +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lmolkova
lmolkova merged commit 1779545 into open-telemetry:main Jul 16, 2026
28 checks passed
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.

3 participants