MeterProvider Interface
public interface MeterProvider
Resolves and provides Meter implementation.
This class is intended to be used by Azure client libraries and provides abstraction over different metrics implementations. Application developers should use metrics implementations such as OpenTelemetry or Micrometer directly.
Method Summary
Modifier and Type | Method and Description |
---|---|
default Meter |
createMeter(LibraryTelemetryOptions libraryOptions, MetricsOptions applicationOptions)
Creates meter instance. |
abstract Meter |
createMeter(String libraryName, String libraryVersion, MetricsOptions applicationOptions)
Creates named and versioned meter instance. |
static
Meter |
getDefaultProvider()
Returns default implementation of |
Method Details
createMeter
public default Meter createMeter(LibraryTelemetryOptions libraryOptions, MetricsOptions applicationOptions)
Creates meter instance.
Parameters:
Returns:
createMeter
public abstract Meter createMeter(String libraryName, String libraryVersion, MetricsOptions applicationOptions)
Creates named and versioned meter instance.
MetricsOptions metricsOptions = new MetricsOptions();
Meter meter = MeterProvider.getDefaultProvider().createMeter("azure-core", "1.0.0", metricsOptions);
Parameters:
Returns:
getDefaultProvider
public static MeterProvider getDefaultProvider()
Returns default implementation of MeterProvider
that uses SPI to resolve metrics implementation.
Returns:
MeterProvider
Applies to
Azure SDK for Java