Skip to content

Conversation

@iblancasa
Copy link
Contributor

Description

Created a registry, similar to the feature gates, for the component metrics.

Link to tracking issue

Fixes #11754

@iblancasa iblancasa requested review from a team, bogdandrutu and dmitryax as code owners December 30, 2025 22:30
…metry levels for their metrics

Signed-off-by: Israel Blancas <[email protected]>
@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.13%. Comparing base (a9aaa99) to head (6b79f8e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14338   +/-   ##
=======================================
  Coverage   92.13%   92.13%           
=======================================
  Files         668      673    +5     
  Lines       41529    41574   +45     
=======================================
+ Hits        38263    38305   +42     
- Misses       2230     2231    +1     
- Partials     1036     1038    +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.

// a given meter or instrument. Components can register these declarations so
// the service can derive default views that drop metrics when the level is
// below the configured threshold.
type MetricLevelConfig struct {
Copy link
Member

Choose a reason for hiding this comment

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

Should we allow components to register views instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe. I'm not against that. I was thinking about keeping this because maybe want to do something based on the stability metric level? Something we can add later. But I'm ok with the change. Let me know what do you think and I will be more than happy to change this.

Copy link
Member

Choose a reason for hiding this comment

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

I haven't reviewed the rest of this PR but I think this should be on an xcomponent package instead of here since this would (at the beginning at least) an experimental package (there's also spec work about this, see open-telemetry/opentelemetry-specification/issues/4391)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm ok with that. Will implement the change.

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.

[component] Add support for components specifying what instruments to enable depending on metric level

3 participants