Package io.opentelemetry.api.metrics
Interface MeterProvider
-
@ThreadSafe public interface MeterProviderA registry for creating namedMeters.A MeterProvider represents a configured (or noop) Metric collection system that can be used to instrument code.
The name Provider is for consistency with other languages and it is NOT loaded using reflection.
- See Also:
Meter
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Meterget(String instrumentationName)Gets or creates a named and versioned meter instance.default Meterget(String instrumentationName, String instrumentationVersion, String schemaUrl)Gets or creates a named and versioned meter instance.MeterBuildermeterBuilder(String instrumentationName)Creates a MeterBuilder for a named meter instance.static MeterProvidernoop()Returns a MeterProvider that does nothing.
-
-
-
Method Detail
-
get
default Meter get(String instrumentationName)
Gets or creates a named and versioned meter instance.- Parameters:
instrumentationName- The name of the instrumentation library, not the name of the instrument*ed* library.- Returns:
- a meter instance.
-
get
default Meter get(String instrumentationName, String instrumentationVersion, String schemaUrl)
Gets or creates a named and versioned meter instance.- Parameters:
instrumentationName- The name of the instrumentation library, not the name of the instrument*ed* library.instrumentationVersion- The version of the instrumentation library.schemaUrl- Specifies the Schema URL that should be recorded in the emitted metrics.- Returns:
- a meter instance.
-
meterBuilder
MeterBuilder meterBuilder(String instrumentationName)
Creates a MeterBuilder for a named meter instance.- Parameters:
instrumentationName- The name of the instrumentation library, not the name of the instrument*ed* library.- Returns:
- a MeterBuilder instance.
- Since:
- 1.4.0
-
noop
static MeterProvider noop()
Returns a MeterProvider that does nothing.
-
-