Distributed tracer implementation.

Implements

Constructors

Methods

  • Wraps an async function with tracing.

    Type Parameters

    • T

    Parameters

    • name: string

      Span name

    • fn: ((span) => Promise<T>)

      Function to wrap

        • (span): Promise<T>
        • Parameters

          Returns Promise<T>

    • Optional options: SpanOptions

      Span options

    Returns Promise<T>

    Result of the function

  • Injects trace context into a carrier (for propagation).

    Type Parameters

    • T extends Record<string, string>

    Parameters

    • carrier: T

      Object to inject into

    Returns T

    The carrier with injected context

Properties

name: string

Gets the tracer name.