AI CompendiumA public chart of the language
Home / Adoption & Ops / Tracing
Adoption & Ops

Tracing

Following one request through every step it took.

Definition

Recording a full request as a tree of spans — retrieval, model calls, tool executions, subagents — with timing, tokens and cost attached to each step.

For agents, traces are the primary debugging tool. When a run goes wrong, the trace shows which step produced the bad context that everything after inherited.

A trace is what turns a multi-step agent from a black box into a timeline: which call was slow, which tool failed, which subagent burned the tokens. For anything beyond a single call, it is the difference between guessing and reading.

How people use it
Debugging a multi-step agent run.
"The trace shows it retrieved the wrong policy at step two and then reasoned correctly on bad input. Fix retrieval."
Worked example

Finding the slow step

An agent task takes ninety seconds and nobody knows why.

The trace shows one retrieval call at sixty-five seconds and four model calls under five. The optimisation is a database index, not a smaller model — a conclusion that is invisible without per-step timing.

Sources
  • standardOpenTelemetry GenAI semantic conventions ↗OpenTelemetry · 2026

    Agreed attribute names for spans, metrics and events covering GenAI clients, MCP and provider specifics — what makes traces comparable across vendors instead of bespoke.

  • docsLangSmith observability ↗LangChain docs · 2026

    A concrete example of what an LLM observability product records: production traces, dashboards, alerts and user feedback. First-party, so not an independent comparison of tools.

Related terms