Interface MeterProvider


@ThreadSafe public interface MeterProvider
A registry for creating named Meters.

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:
  • Method Details

    • 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

      @Deprecated default Meter get(String instrumentationName, String instrumentationVersion, String schemaUrl)
      Deprecated.
      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 no-op MeterProvider which provides meters which do not record or emit.