Skip to content

Annotations for enum members#812

Merged
lquerel merged 5 commits intoopen-telemetry:mainfrom
lmolkova:annotations-for-enum-members
Jul 2, 2025
Merged

Annotations for enum members#812
lquerel merged 5 commits intoopen-telemetry:mainfrom
lmolkova:annotations-for-enum-members

Conversation

@lmolkova
Copy link
Member

@lmolkova lmolkova commented Jul 1, 2025

We need to be able to exclude specific enum members from code generation to prevent collisions, see open-telemetry/semantic-conventions#2455

Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

Overall, looks great. Just nits.

note: None,
stability: None,
deprecated: None,
annotations: None,
Copy link
Contributor

Choose a reason for hiding this comment

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

@jerbly / @lquerel After seeing this type of change bloat PRs a thousand times,

How do we feel about using the DEFAULT syntax so this isn't so tedious when safely adding new fields?

e.g.:

EnumEntriesSpec {
  id: "non-default".to_owned(),
  ...Default::default(),
}

Instead of these more verbose updates where it's harder to see the content of what has changed...

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree

@lmolkova lmolkova force-pushed the annotations-for-enum-members branch from b6fdb6a to 026a28f Compare July 1, 2025 21:47
@codecov
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.9%. Comparing base (825dab3) to head (026a28f).

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #812   +/-   ##
=====================================
  Coverage   76.9%   76.9%           
=====================================
  Files         69      69           
  Lines       5664    5664           
=====================================
  Hits        4359    4359           
  Misses      1305    1305           

☔ View full report in Codecov by Sentry.
📢 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.

@jsuereth jsuereth moved this to Next Release in OTel Weaver Project Jul 2, 2025
Copy link
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@lquerel lquerel enabled auto-merge (squash) July 2, 2025 15:19
@lquerel lquerel merged commit 973f217 into open-telemetry:main Jul 2, 2025
20 checks passed
@github-project-automation github-project-automation bot moved this from Next Release to Done in OTel Weaver Project Jul 2, 2025
@lquerel
Copy link
Contributor

lquerel commented Jul 2, 2025

@lmolkova Ideally, an entry should have been added to the CHANGELOG.md to describe the feature in this PR. But I forgot to check that before the merge of this PR. I’ll add the entry in the PR I’ll create for the release.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants