Skip to main content
All span operations are available under the client.spans namespace. Spans are automatically created when you run prompts or use run_local(), providing visibility into LLM usage, performance, and costs.
Terminology: A span represents a single LLM call. Multiple spans can be grouped into a trace (session) using the trace_id parameter.

Async Variants

Available Methods

List

Get spans with filters and pagination

Get

Retrieve full details of a single span

Evaluate

Submit evaluations for spans

Types

Span

ListSpansOptions

EvaluateOptions

EvaluateResult

Eval Constant

Use the Eval constant for binary evaluations: