@langwatch/scenario
    Preparing search index...

    Function expandTrace

    • Expands one or more spans from a trace, returning their full details (attributes, events, status) with tree position context.

      Spans are matched by prefix: the caller can pass the truncated 8-char span ID shown in the skeleton and it will match any span whose full ID starts with that prefix.

      Parameters

      • spans: ReadableSpan[]

        The full array of ReadableSpan objects for the trace

      • spanIds: string[]

        Span IDs or prefixes to expand

      Returns string

      Formatted string with full span details, truncated to ~4096 tokens