Interface TracerProvider


@ThreadSafe public interface TracerProvider
A registry for creating named Tracers. 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
    get(String instrumentationScopeName)
    Gets or creates a named tracer instance.
    get(String instrumentationScopeName, String instrumentationScopeVersion)
    Gets or creates a named and versioned tracer instance.
    Returns a no-op TracerProvider which only creates no-op Spans which do not record nor are emitted.
    tracerBuilder(String instrumentationScopeName)
    Creates a TracerBuilder for a named Tracer instance.
  • Method Details

    • noop

      static TracerProvider noop()
      Returns a no-op TracerProvider which only creates no-op Spans which do not record nor are emitted.
    • get

      Tracer get(String instrumentationScopeName)
      Gets or creates a named tracer 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 tracer instance.
    • get

      Tracer get(String instrumentationScopeName, String instrumentationScopeVersion)
      Gets or creates a named and versioned tracer 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.
      instrumentationScopeVersion - The version of the instrumentation scope (e.g., "1.0.0").
      Returns:
      a tracer instance.
    • tracerBuilder

      default TracerBuilder tracerBuilder(String instrumentationScopeName)
      Creates a TracerBuilder for a named Tracer 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 TracerBuilder instance.
      Since:
      1.4.0