The write side of a TraceProvider. A TraceIngestor feeds normalized spans in; the sink owns root detection, trace creation, and event emission.
Finalizes a trace as error when execution fails before any span is produced (e.g. a bad model id throws before onStart).
error
onStart
Records a span end. For a root span, finalizes the trace and emits trace-end (+ watch update). Returns the stored (merged) span.
trace-end
update
Records a span start. Creates a running trace for a new root. Returns the stored (merged) span. Emits span-start (+ watch add for a new trace).
running
span-start
add
The write side of a TraceProvider. A TraceIngestor feeds normalized spans in; the sink owns root detection, trace creation, and event emission.