OpenTelemetry Trace API for getting tracers. This provides the standard OpenTelemetry trace API entry point.

interface IOTelTracerProvider {
    forceFlush?: (() => void | IPromise<void>);
    getTracer(name: string, version?: string, options?: IOTelTracerOptions): IOTelTracer;
    shutdown?: (() => void | IPromise<void>);
}

Hierarchy (view full)

Properties

Methods

Properties

forceFlush?: (() => void | IPromise<void>)

Forces the tracer provider to flush any buffered data.

Type declaration

    • (): void | IPromise<void>
    • Returns void | IPromise<void>

      A promise that resolves when the flush is complete.

shutdown?: (() => void | IPromise<void>)

Shuts down the tracer provider and releases any resources.

Type declaration

    • (): void | IPromise<void>
    • Returns void | IPromise<void>

      A promise that resolves when the shutdown is complete.

Methods

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

    • The same Tracer instance if one has already been created with the same name and version
    • A new Tracer instance if one has not already been created with the same name and version
    • A non-operational Tracer if the provider is not operational

    Parameters

    • name: string

      The name of the tracer or instrumentation library.

    • Optionalversion: string

      The version of the tracer or instrumentation library.

    • Optionaloptions: IOTelTracerOptions

      The options of the tracer or instrumentation library.

    Returns IOTelTracer

    Tracer A Tracer with the given name and version