evalution
    Preparing search index...

    Interface TraceProvider

    A read-only store of execution traces that the playground can display and subscribe to in real time. Implement this interface to integrate a tracing backend.

    TraceProvider is a pure read interface — populating the store is the job of a TraceIngestor, which feeds normalized spans into the provider's write side (TraceSink, implemented by BaseTraceProvider).

    interface TraceProvider {
        description?: string;
        displayName?: string;
        id: string;
        getAllTraces(): Promise<TraceSummary[]>;
        getTrace(traceId: string): Promise<TraceWithSpans | undefined>;
        subscribeTrace?(
            traceId: string,
            callback: (event: TraceStreamEvent) => void,
        ): () => void;
        watch?(callback: (event: TraceChangeEvent) => void): () => void;
    }

    Implemented by

    Index

    Properties

    description?: string

    Short description of what this provider offers.

    displayName?: string

    Human-readable name shown when choosing between providers.

    id: string

    Uniquely identifies this instance, even when multiple providers of the same type are used.

    Methods

    • Subscribes to real-time updates for a specific trace. The callback is invoked for every Span change on this trace, for as long as the returned cleanup function has not been called.

      Optional — providers that cannot track live changes may omit it.

      Parameters

      Returns () => void

      A no-argument function that cancels the subscription.

    • Registers a callback invoked whenever a trace is added, updated, or removed. Used by the sidebar to stay in sync without polling.

      Optional — providers that cannot detect live changes may omit it.

      Parameters

      Returns () => void

      A no-argument function that unregisters the watcher.