Build an immutable span index from OTel TraceData.
Performs a single pass to collect spans, resolve parent-child links,
order them depth-first by start time, and compute the bounding time range.
The result is a frozen data structure suitable for repeated read access.
A span id that occurs twice keeps the later span. A span whose parent is not
in the data is a root, and so is the earliest member of a parent cycle.
Build an immutable span index from OTel TraceData.
Performs a single pass to collect spans, resolve parent-child links, order them depth-first by start time, and compute the bounding time range. The result is a frozen data structure suitable for repeated read access.
A span id that occurs twice keeps the later span. A span whose parent is not in the data is a root, and so is the earliest member of a parent cycle.