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

    Interface SpanTable

    Columnar, read-only form of one trace. Every array has one entry per row unless noted; do not mutate any of them.

    Invariants:

    • rows are in depth-first pre-order: a span's parent has a smaller row number, and its descendants are exactly rows row + 1 … subtreeEnd[row] - 1;
    • siblings (and roots) are ordered by start, ties keeping input order;
    • depth[row] === depth[parent[row]] + 1, and 0 for roots;
    • evT is non-decreasing within each span's range evOff[row] … evOff[row + 1] - 1.
    interface SpanTable {
        depth: Int32Array;
        end: Float64Array;
        evOff: Int32Array;
        evSrc: Int32Array;
        evT: Float64Array;
        extentMs: number;
        ids: readonly string[];
        kind: Uint8Array;
        length: number;
        nameId: Int32Array;
        names: readonly string[];
        originNs: bigint;
        parent: Int32Array;
        services: readonly string[];
        start: Float64Array;
        status: Uint8Array;
        subtreeEnd: Int32Array;
        svc: Uint32Array;
    }
    Index

    Properties

    depth: Int32Array

    Depth in the tree: 0 for a root.

    end: Float64Array

    End of each span, ms after the origin. Not clamped: a malformed span may end before it starts.

    evOff: Int32Array

    Events in compressed-row form. evOff has length + 1 entries: row r owns evOff[r] … evOff[r + 1] - 1.

    evSrc: Int32Array

    Position of each event in its span's original events array, so span.events[evSrc[k]] is event k.

    evT: Float64Array

    Event times, ms after the origin, sorted within each span. One entry per event of the whole trace.

    extentMs: number

    Length of the time axis: the latest start or end of any span, ms after the origin. 0 for an empty trace.

    ids: readonly string[]

    Span id of each row.

    kind: Uint8Array

    SpanKind value; 0 (unspecified) for anything outside 0–255.

    length: number

    Number of spans (rows).

    nameId: Int32Array

    Index into SpanTable.names.

    names: readonly string[]

    Distinct span names, in order of first appearance among the rows.

    originNs: bigint

    The instant that counts as time zero, the earliest span start: nanoseconds since the Unix epoch.

    parent: Int32Array

    Row of the parent span, or -1 for a root.

    services: readonly string[]

    Distinct service names, in order of first appearance among the rows.

    start: Float64Array

    Start of each span, ms after the origin.

    status: Uint8Array

    Status code: 0 unset, 1 ok, 2 error (as sent; 0 when missing).

    subtreeEnd: Int32Array

    One past the last row of this span's subtree, so a leaf has subtreeEnd === row + 1.

    svc: Uint32Array

    Index into SpanTable.services.