A registry for creating named Tracers.

1.0.0

interface TracerProvider {
    getTracer(
        name: string,
        version?: string,
        options?: @opentelemetry/api.TracerOptions,
    ): @opentelemetry/api.Tracer;
}

Implemented by

Methods

Methods

  • Returns a Tracer, creating one if one with the given name and version is not already created.

    This function may return different Tracer types (e.g. NoopTracerProvider vs. a functional tracer).

    Parameters

    • name: string

      The name of the tracer or instrumentation library.

    • Optionalversion: string

      The version of the tracer or instrumentation library.

    • Optionaloptions: @opentelemetry/api.TracerOptions

      The options of the tracer or instrumentation library.

    Returns @opentelemetry/api.Tracer

    Tracer A Tracer with the given name and version