n. / Tracing basics
Definition
A parent span is a span that contains other spans, called its children, because the work it measures started them. The parent-child links are what turn a flat list of spans into a tree you can read from top to bottom.
In more detail
In an agent run the root span usually covers the whole request. Its children are model calls and tool calls, and a tool call can have its own children, such as a database query. A parent's duration covers its children, so a slow parent with fast children points to time spent in the parent's own code.
Example
The root span "answer-question" has children "retrieve-documents" and "call-model". The retrieval span has a child "vector-search". If vector-search takes 900 ms of a 1 s retrieval, you know where to look.
Related terms
