evalution
    Preparing search index...

    Class BaseTraceProviderAbstract

    Source-agnostic base class for a TraceProvider. Owns storage delegation, subscriptions, watchers, and the generic trace lifecycle that every concrete provider shares, regardless of how spans are produced.

    Subclasses implement the abstract storage hooks; ingestion is handled by one or more TraceIngestors that call recordSpanStart / recordSpanEnd / failTrace on this instance (via TraceSink).

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    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

    • Stores a span, merging it into any existing span with the same ID (via the mergeSpans helper). Returns the resulting stored span so callers can stream the merged view rather than the partial snapshot they passed in.

      Parameters

      Returns Promise<Span>

    • Finalizes a trace as error when execution fails before any span is produced (e.g. a bad model id throws before onStart).

      Parameters

      • traceId: string
      • errorMessage: string

      Returns Promise<void>

    • 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.