Skip to content

Conversation

@dmitryax
Copy link
Member

@dmitryax dmitryax commented Sep 26, 2025

metadata.yaml schema change for attributes: boolean optional field replaced with enum requirement_level field with the following options:
- required: attribute is always included and cannot be excluded
- conditionally_required: attribute is included by default when certain conditions are met (replaces optional: true)
- recommended: attribute is included by default but can be disabled via configuration (replaces optional: false)
- opt_in: attribute is not included unless explicitly enabled in user config

The recommended option is assumed when requirement_level isn't specified explicitly which is the case for the vast majority use cases.

metadata.yaml files upgrade guideline: Replace optional: true with requirement_level: conditionally_required and optional: false with requirement_level: recommended (or omit for default) in metadata files.

This change is needed for #13900

@dmitryax dmitryax requested a review from a team as a code owner September 26, 2025 22:54
@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.59%. Comparing base (8b09905) to head (e6d2492).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
cmd/mdatagen/internal/metadata.go 83.33% 5 Missing ⚠️

❌ Your patch status has failed because the patch coverage (91.07%) 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   #13913      +/-   ##
==========================================
- Coverage   91.61%   91.59%   -0.03%     
==========================================
  Files         655      655              
  Lines       42782    42814      +32     
==========================================
+ Hits        39195    39215      +20     
- Misses       2764     2774      +10     
- Partials      823      825       +2     

☔ 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 dmitryax force-pushed the add-disabled-attributes branch from b5802cb to 5e2c2de Compare October 20, 2025 20:37
@dmitryax dmitryax changed the title [mdatagen] Replace optional field with availability for attributes [mdatagen] Replace attributes optional field with requirement_level Oct 20, 2025
@dmitryax dmitryax force-pushed the add-disabled-attributes branch from 5e2c2de to 81d7df6 Compare October 20, 2025 20:54
metadata.yaml schema change for attributes: boolean `optional` field replaced with enum `requirement_level` field with the following options:
    - `required`: attribute is always included and cannot be excluded
    - `conditionally_required`: attribute is included by default when certain conditions are met (replaces `optional: true`)
    - `recommended`: attribute is included by default but can be disabled via configuration (replaces `optional: false`)
    - `opt_in`: attribute is not included unless explicitly enabled in user config

The `recommended` option is assumed when requirement_level isn't specified explicitly which is the case for the vast majority use cases.

metadata.yaml files upgrade guideline: Replace `optional: true` with `requirement_level: conditionally_required` and `optional: false` with `requirement_level: recommended` (or omit for default) in metadata files.
8b0990
@dmitryax dmitryax force-pushed the add-disabled-attributes branch from 81d7df6 to e6d2492 Compare October 20, 2025 20:58
@dmitryax
Copy link
Member Author

dmitryax commented Oct 21, 2025

Merging given that I've got one approval and addressed the comments

@dmitryax dmitryax added this pull request to the merge queue Oct 21, 2025
Merged via the queue into open-telemetry:main with commit c657d5d Oct 21, 2025
60 of 61 checks passed
@dmitryax dmitryax deleted the add-disabled-attributes branch October 21, 2025 23:36
@github-actions github-actions bot added this to the next release milestone Oct 21, 2025
dmitryax added a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Oct 22, 2025
Picking up
open-telemetry/opentelemetry-collector#13913
which resulted in updating only the generated documentaion.md files, no
code changes
github-merge-queue bot pushed a commit that referenced this pull request Oct 22, 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.

4 participants