log2trace-ui - v1.0.0-RC1
    Preparing search index...

    Interface TraceVisualizerConfig

    Unified runtime configuration for the <trace-visualizer> Web Component.

    Every field maps 1:1 to a kebab-case HTML attribute on the custom element, so the same options can be set declaratively from markup or imperatively via the config setter. The interface deliberately mixes two concerns:

    • Transform fields (traceIdField, spanGroupFields, spanNameField, serviceNameField, timestampField, etc.) tell the component how to map raw log records onto the OTel span model. They are required only when feeding the component logs rather than pre-built TraceData.
    • Display fields (width, height, colorScheme, showLegend, detailPanelWidth, etc.) control rendering. Defaults are applied by resolveDisplayDefaults.

    All fields are optional so a single shared type can describe both the declarative attribute surface and the resolved runtime config. TransformConfig narrows it to the transform-required subset.

    interface TraceVisualizerConfig {
        autoFetch?: boolean;
        backgroundColor?: string;
        colorScheme?: Record<string, string>;
        dataUrl?: string;
        defaultSpanKind?: string;
        detailPanelWidth?: string;
        endTimeField?: string;
        filterConfigs?: FilterFieldConfig[];
        fullWidth?: boolean;
        height?: number;
        parentSpanIdField?: string;
        parentSpanLookupFields?: string | string[];
        serviceNameField?: string;
        showLegend?: boolean;
        spanGroupFields?: string | string[];
        spanHeight?: number;
        spanIdField?: string;
        spanKindRules?: SpanKindRule[];
        spanNameField?: string;
        spanPadding?: number;
        statusCodeField?: string;
        timestampField?: string;
        traceIdField?: string;
        width?: number;
    }
    Index

    Properties

    autoFetch?: boolean

    Whether external filter changes auto-trigger fetch (default true). When false, a "Search" button is rendered.

    backgroundColor?: string

    Container background color (CSS value, default "#ffffff")

    colorScheme?: Record<string, string>

    SpanKind → color map for span bars and legend

    dataUrl?: string

    URL to fetch trace/log data from

    defaultSpanKind?: string

    Default SpanKind when no rule matches or no rules are configured. Accepts a SpanKind name (e.g. "Internal", "Server") or numeric value (0-5). Defaults to "Unspecified".

    detailPanelWidth?: string

    CSS width of the detail side-panel (default "40%")

    endTimeField?: string

    Dot-path to an explicit end-time field, if available

    filterConfigs?: FilterFieldConfig[]

    Filter field definitions. Can be set programmatically or via child elements.

    fullWidth?: boolean

    Stretch to fill parent width (default false)

    height?: number

    Minimum container height in pixels (0 = fit content)

    parentSpanIdField?: string

    Dot-path to a field providing parent-child hierarchy between spans

    parentSpanLookupFields?: string | string[]

    Dot-path(s) whose values identify the parent span's group fields (partial match). Positionally corresponds to spanGroupFields — e.g. ["text.InitiatingApplication"] matches the first component of spanGroupFields. Resolved after all spans are built: first tries encompassing span, then latest-before.

    serviceNameField?: string

    Dot-path to the field that determines the service/resource row (e.g. "text.MachineName")

    showLegend?: boolean

    Show the span-kind color legend (default false)

    spanGroupFields?: string | string[]

    Dot-path(s) that group logs into spans within a trace. If omitted, each log becomes its own span.

    spanHeight?: number

    Pixel height of each span bar (default 30)

    spanIdField?: string

    Dot-path to a unique log identifier (used in one-log-per-span mode)

    spanKindRules?: SpanKindRule[]

    Rules for determining SpanKind from log field values. Each rule has match (dot-path→value pairs, all must match) and kind (SpanKind name). First matching rule wins; default is defaultSpanKind or Unspecified.

    spanNameField?: string

    Dot-path to the field used as the span name/label (e.g. "text.Action")

    spanPadding?: number

    Pixel spacing between span rows (default 5)

    statusCodeField?: string

    Dot-path to an error-code field (e.g. "text.Code"). If any log in a span has a non-zero / truthy value, the span status is Error.

    timestampField?: string

    Dot-path to the timestamp field (ISO 8601 or epoch-ms)

    traceIdField?: string

    Dot-path to the field that groups logs into traces (e.g. "text.BTMID")

    width?: number

    Container width in pixels (0 = fit container)