From spans to a waterfall
Tracewell's Span type is a flattened tree: each span has a depth, an offset from the start of the trace and a duration, all in milliseconds. Walk the OTel span tree depth-first, compute those three numbers and the waterfall draws itself.
Span kinds
The kit colors spans by kind: chain, llm, retrieval, tool and guardrail. Use gen_ai.operation.name where it's set, and your own span names (for example retrieve, guardrail.check) for the rest.
Collecting the data
Your product receives traces over OTLP, stores them, and serves trace lists and trace detail from its API. Tracewell is the front end for that API; it doesn't talk OTLP itself.