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 Summary

    Modifier and Type
    Method
    Description
    default Meter
    get(String instrumentationName)
    Gets or creates a named and versioned meter instance.
    meterBuilder(String instrumentationName)
    Creates a MeterBuilder for a named meter instance.
    Returns a no-op MeterProvider which provides meters which do not record or emit.
  • 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.
    • 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.