Definition

Span

A span is one individual action inside a trace: an LLM call, a tool call, a RAG retrieval, a guardrail check. Spans nest, so a tool call can contain child spans for the HTTP request and response parsing. For agents, each span should record model, token counts, latency, tool arguments and results, retrieved documents with scores, and where possible the reasoning. Structured logging makes them queryable.

Span diagram from Intelligence at Scale
Diagram from chapter 13, Production AI: Deployment, Monitoring, and Evaluation

Explained in

Chapter 13: Production AI: Deployment, Monitoring, and Evaluation

The reality of running AI agents. It's nothing like the demo.

Related terms

This is one term. The chapter is the argument.

Intelligence at Scale: 22 chapters, 65,000 words, 80-plus diagrams. Kindle, paperback and hardcover on Amazon.

Buy on Amazon.com
← All terms