Skip to content

fix: default enum member value to id#1444

Open
nanookclaw wants to merge 3 commits into
open-telemetry:mainfrom
nanookclaw:fix/enum-value-defaults
Open

fix: default enum member value to id#1444
nanookclaw wants to merge 3 commits into
open-telemetry:mainfrom
nanookclaw:fix/enum-value-defaults

Conversation

@nanookclaw
Copy link
Copy Markdown
Contributor

@nanookclaw nanookclaw commented May 16, 2026

What changed

Enum member deserialization now accepts entries without an explicit value field and fills the public EnumEntriesSpec.value with the member id. Explicit value fields are still preserved.

This keeps downstream code working with a concrete ValueSpec while matching the semantic convention schema behavior described in #733.

Closes #733.

Verification

  • cargo test -p weaver_semconv test_enum_member_value_defaults_to_id
  • cargo test -p weaver_semconv

@nanookclaw nanookclaw requested a review from a team as a code owner May 16, 2026 13:59
Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
@nanookclaw nanookclaw force-pushed the fix/enum-value-defaults branch from 7447e92 to b13fd2a Compare May 16, 2026 14:00
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.2%. Comparing base (f52329c) to head (7b13bfd).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1444   +/-   ##
=====================================
  Coverage   82.2%   82.2%           
=====================================
  Files        125     125           
  Lines      10241   10249    +8     
=====================================
+ Hits        8423    8431    +8     
  Misses      1818    1818           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
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.

Semconv schema: enum types - value is optional, inherit it from the id when not present

1 participant