@bitsinfra/fusee
    Preparing search index...

    Function openTelemetry

    • Instruments from the application's @opentelemetry/api module (pass the module itself): a fusee.step span per step attempt, nested under whatever is active, and the metrics fusee.steps.executed, fusee.step.duration, fusee.workflows.started and fusee.workflows.finished. Replayed steps record nothing.

      Parameters

      • api: {
            context: { active(): unknown; with<T>(ctx: unknown, fn: () => T): T };
            metrics: {
                getMeter(
                    name: string,
                    version?: string,
                ): {
                    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 };
                };
            };
            trace: {
                getSpanContext?(
                    ctx: unknown,
                ): { spanId: string; traceFlags: number; traceId: string } | undefined;
                getTracer(
                    name: string,
                    version?: string,
                ): {
                    startSpan(
                        name: string,
                        options?: { attributes?: Attrs },
                        context?: unknown,
                    ): SpanLike;
                };
                setSpan(ctx: unknown, span: SpanLike): unknown;
                setSpanContext?(
                    ctx: unknown,
                    sc: {
                        isRemote?: boolean;
                        spanId: string;
                        traceFlags: number;
                        traceId: string;
                    },
                ): unknown;
            };
        }

      Returns Telemetry