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 instrumentationScopeName)
    Gets or creates a named and versioned meter instance.
    meterBuilder(String instrumentationScopeName)
    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 instrumentationScopeName)
      Gets or creates a named and versioned meter instance.
      Parameters:
      instrumentationScopeName - A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
      Returns:
      a meter instance.
    • meterBuilder

      MeterBuilder meterBuilder(String instrumentationScopeName)
      Creates a MeterBuilder for a named meter instance.
      Parameters:
      instrumentationScopeName - A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
      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.