Skip to content

Add metric requirement level#1381

Draft
joaopgrassi wants to merge 6 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:add-metric-requirement-level
Draft

Add metric requirement level#1381
joaopgrassi wants to merge 6 commits intoopen-telemetry:mainfrom
dynatrace-oss-contrib:add-metric-requirement-level

Conversation

@joaopgrassi
Copy link
Copy Markdown
Member

Fixes #406

This adds the metric requirement level to the model/schema. This will enable us to auto-generate the entire metric markdown pages, without having to enter the metric name + requirement level by hand, how it is today (which is prone to getting out-of-date as seen here)

Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.8%. Comparing base (db0ec1b) to head (66d8032).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_resolved_schema/src/lib.rs 0.0% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1381     +/-   ##
=======================================
- Coverage   81.8%   81.8%   -0.1%     
=======================================
  Files        119     119             
  Lines       9938    9947      +9     
=======================================
+ Hits        8138    8142      +4     
- Misses      1800    1805      +5     

☔ 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: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Comment thread crates/weaver_resolved_schema/src/lib.rs Fixed
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Signed-off-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
Copy link
Copy Markdown
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.

Nice fixes!!!

A few thoughts --

I'm less concerned with naming for V1 - and that change is ok, we can ignore features that aren't coming to V2 syntax.

For V2 - I have a few questions:

  1. Should this just be requirement_level on the metric section? Given there's no ambiguity in V2 now, I'd prefer to keep it simple/consistent.
  2. If I'm refining/extending a metric, should I be able to change requirement level? My gut reaction is 'no', but wanted to check.

pub entity_associations: Vec<String>,
/// The requirement level of the metric. Defaults to 'recommended' when omitted.
#[serde(skip_serializing_if = "Option::is_none")]
pub metric_requirement_level: Option<BasicRequirementLevelSpec>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: We should just call this requirement_level here - We're in a specific metrics: section, so it's mroe obvious that there should be one.

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.

Add metric requirement level to yaml

3 participants