Package io.opentelemetry.api.metrics
Class GlobalMeterProvider
java.lang.Object
io.opentelemetry.api.metrics.GlobalMeterProvider
This class is a temporary solution until metrics SDK is marked stable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MeterProviderget()Returns the globally registeredMeterProvider.static voidset(MeterProvider provider) Sets theMeterProviderthat should be the global instance.
-
Method Details
-
get
Returns the globally registeredMeterProvider. -
set
Sets theMeterProviderthat should be the global instance. Future calls toget()will return the providedMeterProviderinstance. This should be called once as early as possible in your application initialization logic, often in astaticblock in your main class.
-