Skip to content
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

Update documentation for Metrics API #2280

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented Nov 6, 2024

Changes

  • Update documentation for Metrics API

@utpilla utpilla requested a review from a team as a code owner November 6, 2024 22:33
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.4%. Comparing base (ebf1bb6) to head (5a05fbf).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2280   +/-   ##
=====================================
  Coverage   79.4%   79.4%           
=====================================
  Files        122     122           
  Lines      20795   20795           
=====================================
  Hits       16514   16514           
  Misses      4281    4281           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -11,6 +11,8 @@ static GLOBAL_METER_PROVIDER: Lazy<RwLock<GlobalMeterProvider>> =

/// Sets the given [`MeterProvider`] instance as the current global meter
/// provider.
///
/// **NOTE:** This function should be called before getting [`Meter`] instances via [`meter()`] or [`meter_with_scope()`]. Otherwise, you could get no-op [`Meter`] instances.
Copy link
Member

Choose a reason for hiding this comment

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

can we mention something like - do this at the earliest stage of your application/similar? Or is this sufficient?
I am also wondering what happens if a library statically creates Meter - is that going to be no-ops always, as we won't have an opportunity to set the global provider beforehand?

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.

2 participants