@bitsinfra/fusee
    Preparing search index...

    Interface Telemetry

    OpenTelemetry instruments for an engine, structurally typed so Fusee has no dependency on @opentelemetry/api. Build one with openTelemetry(api).

    interface Telemetry {
        meter?: {
            createCounter(
                name: string,
                options?: { description?: string; unit?: string },
            ): { add(n: number, attrs?: Attrs): void };
            createHistogram(
                name: string,
                options?: { description?: string; unit?: string },
            ): { record(n: number, attrs?: Attrs): void };
        };
        tracer?: {
            startSpan(
                name: string,
                options?: { attributes?: Attrs },
                context?: unknown,
            ): SpanLike;
        };
        remote?(traceparent: string): unknown;
        spanIn?(span: SpanLike, parent?: unknown): unknown;
        traceparent?(): string | undefined;
        withSpan?<T>(span: SpanLike, fn: () => T): T;
    }
    Index
    meter?: {
        createCounter(
            name: string,
            options?: { description?: string; unit?: string },
        ): { add(n: number, attrs?: Attrs): void };
        createHistogram(
            name: string,
            options?: { description?: string; unit?: string },
        ): { record(n: number, attrs?: Attrs): void };
    }
    tracer?: {
        startSpan(
            name: string,
            options?: { attributes?: Attrs },
            context?: unknown,
        ): SpanLike;
    }

    context: the parent (from spanIn or remote); the active one when absent.

    • A context whose parent is the span a traceparent names.

      Parameters

      • traceparent: string

      Returns unknown

    • A context with span as the active span, below parent (the active one when absent).

      Parameters

      Returns unknown

    • The active span's W3C traceparent: a run started here joins its trace.

      Returns string | undefined

    • Runs fn with span as the active span, so the step's own spans nest under it.

      Type Parameters

      • T

      Parameters

      Returns T