-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[mdatagen] Replace attributes optional field with requirement_level #13913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mdatagen] Replace attributes optional field with requirement_level #13913
Conversation
Codecov Report❌ Patch coverage is
❌ 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. 🚀 New features to boost your workflow:
|
93eb88e to
b5802cb
Compare
b5802cb to
5e2c2de
Compare
optional field with availability for attributes5e2c2de to
81d7df6
Compare
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
81d7df6 to
e6d2492
Compare
|
Merging given that I've got one approval and addressed the comments |
c657d5d
Picking up open-telemetry/opentelemetry-collector#13913 which resulted in updating only the generated documentaion.md files, no code changes
metadata.yaml schema change for attributes: boolean
optionalfield replaced with enumrequirement_levelfield 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 (replacesoptional: true)-
recommended: attribute is included by default but can be disabled via configuration (replacesoptional: false)-
opt_in: attribute is not included unless explicitly enabled in user configThe
recommendedoption 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: truewithrequirement_level: conditionally_requiredandoptional: falsewithrequirement_level: recommended(or omit for default) in metadata files.This change is needed for #13900