Skip to content

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented Sep 30, 2025

Resource attributes now require an explicit enabled field in metadata.yaml files, while regular attributes are prohibited from having this field. This improves validation and prevents configuration errors.

Brought from discussion in #13900

Fixes #12722

@dmitryax dmitryax requested a review from a team as a code owner September 30, 2025 19:17
Resource attributes now require an explicit `enabled` field in metadata.yaml files, while regular attributes are prohibited from having this field. This improves validation and prevents configuration errors.
@dmitryax dmitryax force-pushed the control-attribute-enabled branch from 6d92750 to 04bb6d9 Compare September 30, 2025 19:22
@dmitryax
Copy link
Member Author

Failing contrib tests catch missing enabled field on the resource attributes. I'll fix them there

Copy link

codecov bot commented Sep 30, 2025

Codecov Report

❌ Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.66%. Comparing base (4670870) to head (04bb6d9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/mdatagen/internal/metadata.go 20.00% 5 Missing and 3 partials ⚠️

❌ Your patch status has failed because the patch coverage (20.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13921      +/-   ##
==========================================
- Coverage   91.68%   91.66%   -0.02%     
==========================================
  Files         652      652              
  Lines       42506    42516      +10     
==========================================
+ Hits        38972    38973       +1     
- Misses       2728     2734       +6     
- Partials      806      809       +3     

☔ 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.

dmitryax added a commit to dmitryax/opentelemetry-collector-contrib that referenced this pull request Sep 30, 2025
If enabled is unset in metadata.yaml it's defaulted to false. This commit doesn't change any behavior, it only unblocks the stricter validation open-telemetry/opentelemetry-collector#13921 by setting the false value explicitly

Likely the enabled fields are missed by mistake here. If so, they should be explicitly fixed separately.
@dmitryax
Copy link
Member Author

Submitted a PR to fix contrib tests open-telemetry/opentelemetry-collector-contrib#43085

dmitryax added a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Sep 30, 2025
If `enabled` is unset in metadata.yaml defaults to false. This commit
doesn't change any behavior, it only unblocks the stricter validation
open-telemetry/opentelemetry-collector#13921 by
setting the false value explicitly.

Likely the enabled fields are missed by mistake here. If so, they should
be explicitly fixed separately, cc (code owners of the effected
components) @nslaughter, @celian-garcia, @ishleenk17, @Caleb-Hurshman,
@mrsillydog.
@dmitryax dmitryax added this pull request to the merge queue Sep 30, 2025
Merged via the queue into open-telemetry:main with commit 3484f81 Sep 30, 2025
61 of 63 checks passed
@dmitryax dmitryax deleted the control-attribute-enabled branch September 30, 2025 23:39
@github-actions github-actions bot added this to the next release milestone Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cmd/mdatagen] Support metric attributes

2 participants