log2trace-ui - v1.0.0-rc.9
    Preparing search index...

    Interface SpanIndex

    Immutable index over a set of spans.

    All fields are pre-computed at construction time by buildSpanIndex. The index is read-only; per-view state (what is collapsed, selected or filtered) lives in the trace store, not here.

    interface SpanIndex {
        childrenOf: ReadonlyMap<string, readonly string[]>;
        ordered: readonly IndexedSpan[];
        roots: readonly string[];
        size: number;
        spans: ReadonlyMap<string, IndexedSpan>;
        table: SpanTable;
        timeRange: Readonly<{ max: number; min: number }>;
        traceId: string;
    }
    Index

    Properties

    childrenOf: ReadonlyMap<string, readonly string[]>

    Parent spanId → child spanIds, sorted by start time.

    ordered: readonly IndexedSpan[]

    All spans in depth-first pre-order, so ordered[i].idx === i.

    roots: readonly string[]

    Span IDs of root spans (no resolvable parent), sorted by start time.

    size: number

    Total number of spans.

    spans: ReadonlyMap<string, IndexedSpan>

    All indexed spans keyed by spanId for O(1) lookup.

    table: SpanTable

    The same spans as parallel typed arrays, with exact sub-millisecond times and the tree as row arithmetic.

    timeRange: Readonly<{ max: number; min: number }>

    Pre-computed bounding time range in whole milliseconds since the Unix epoch.

    traceId: string

    Trace ID from the first root span (for display).