Span represents a single operation within an agent execution. Spans form a parent-child hierarchy within a trace, allowing you to understand the execution flow.
Span Attributes
Common Span Names
Spans are automatically created for various operations:Attributes by Operation Type
Theattributes field contains OpenTelemetry semantic attributes that vary by operation:
LLM Spans
Tool Spans
Methods
to_dict()
Convert the span to a dictionary.
dict
from_dict()
Create a span from a dictionary.
data(dict): Dictionary containing span data
Span
Usage
Building a Span Tree
See Also
- Trace Reference - Complete execution trace
- DB Functions - Query functions for traces and spans