loading
loading
One timed unit of work inside a trace — a single LLM call, tool call, or step.
A trace is a tree of spans; each span records its name, start/end time, inputs, outputs, and metadata like token count or error, and nests under a parent span. They're the granularity that lets you answer 'where did the latency and the cost actually go?' — you sort spans by duration and the slow tool call jumps out. Example: an agent turn is one trace containing a 'retrieve' span, three 'llm.completion' spans, and a 'send_email' tool span.
Plainly
Think of Span as roads and power for the app city. One timed unit of work inside a trace — a single LLM call, tool call, or step.
In practice
Use it when local behavior needs to become a reachable, reliable deployed service. In practice, define the owner, input, output, and failure mode before you rely on it.