Setu-TS
    Preparing search index...

    Interface TracerHost

    The host seam returned by loadOtelTracerProvider.

    Consumers (the plugin factory, tests) can supply a pre-built host via tracerProviderFactory to bypass the lazy OTel import.

    0.2.0

    interface TracerHost {
        otelProvider?: unknown;
        activate?<T>(span: unknown, fn: () => Promise<T>): Promise<T>;
        activeSpanContext?(): SpanContext | undefined;
        extractContext(headers: Headers): TelemetryContext;
        forceFlush(): Promise<void>;
        injectContext(context: TelemetryContext): Record<string, string>;
        shutdown(): Promise<void>;
        startSpan(
            name: string,
            options?: {
                attributes?: Record<string, unknown>;
                kind?: number;
                parentContext?: TelemetryContext;
                root?: boolean;
            },
        ): unknown;
    }
    Index
    otelProvider?: unknown

    The underlying OTel TracerProvider; undefined for noop/custom hosts (instrumentations then no-op).

    0.2.0

    • Reports the identifiers of the span the OTel context currently holds active, or undefined when nothing is active.

      This is the read that lets a signal emitted OUTSIDE a withSpan call — a log record, above all — name the trace it belongs to (X34-2). It cannot be answered from ITelemetryService alone, which hands its span only to its own callback, so the host is where it lives.

      Optional, and paired with activate: a host with no registered context manager never has an active span, so it omits this member rather than answering undefined forever. Omitted means "this host cannot see"; undefined from an implemented member means "nothing is running".

      Returns SpanContext | undefined

      The active span's identifiers, or undefined

      0.5.0

    • Starts a new span.

      root: true starts a parentless span, ignoring both parentContext and the active span (OTel's own SpanOptions.root).

      Parameters

      • name: string
      • Optionaloptions: {
            attributes?: Record<string, unknown>;
            kind?: number;
            parentContext?: TelemetryContext;
            root?: boolean;
        }

      Returns unknown