
What Is Agent Observability? Traces, Spans, and Token Attribution
Agent observability records every step an AI agent takes. Learn how traces, spans, and token attribution reveal what your agent actually did at runtime.
This topic is curated by our AI council — see how it works.
An agent that quietly retries a payment or picks the wrong tool leaves no compiler error and no failed test — it leaves a trace, if you captured one. That single fact makes agent observability the entry point for most of the other operational decisions in this theme: you cannot fix cost, guardrails, or error handling for a failure you never saw. It sits inside the daily operations loop of the agent reliability theme, the layer that turns a non-deterministic, multi-step run into something a team can actually read and be on call for.
Start with what traces, spans, and token attribution reveal about what agents actually do — it builds the vocabulary every later decision depends on: what a span records, what a trace strings together, and why token attribution turns a vague bill into a per-step ledger. Read the prerequisites and hard limits of observing agents in production right after — it is the honest version of the first article, mapping what distributed tracing assumes about determinism and where those assumptions still break for LLM calls.
When you are ready to instrument something real, the guide to LangSmith, Langfuse, and OpenTelemetry GenAI walks the setup and the architecture question each tool answers differently. For the market context behind that choice, the 2026 observability market after the ClickHouse and Datadog moves tracks which vendor philosophy you are actually buying into. Close with the privacy and ethics of capturing everything an agent sees before you ship tracing to production — the same instrumentation that debugs your agent also records your users.

Three neighbours get folded into “observability,” and each folding sends the wrong team down the wrong hallway.
Q: Do I need a dedicated agent observability platform, or does my existing APM tool already cover this? A: Classical APM was not built for non-deterministic, multi-step LLM calls, and the market has responded with dedicated tooling rather than APM add-ons — the 2026 shakeout after the ClickHouse and Datadog moves shows infrastructure vendors absorbing the telemetry layer specifically because general APM did not fit.
Q: Should I build on LangSmith, Langfuse, or OpenTelemetry GenAI for a new agent project? A: Pick on architecture, not on logos: the three represent proprietary depth, OTel-native open source, and a vendor-neutral standard respectively. The instrumentation guide walks the trade-offs before you commit a codebase to one.
Q: What should I mask or exclude before turning on full agent tracing in production? A: Assume the trace will contain PII the moment tracing captures tool inputs and outputs, because that is exactly what agents pass to tools. The privacy and ethics discussion walks through what “capture everything” actually captures before you ship it.
Q: Can I trust a fully green trace as proof my agent did the right thing? A: No — a span records whether a call completed, not whether the decision behind it was correct. The hard limits of observing agents in production explains why task-level correctness sits outside what current tracing conventions capture.
Part of the agent reliability & operations theme · closest neighbour: agent error handling and recovery. New to this from a software background? Start with the story: Agent Reliability for Engineers: What SRE Habits Map and Break.
An AI agent without observability is a black box that occasionally produces an answer and frequently produces a bill. This step covers the core concepts — traces, spans, token attribution — that turn agent execution into something you can actually read.
Concepts covered

Agent observability records every step an AI agent takes. Learn how traces, spans, and token attribution reveal what your agent actually did at runtime.

OpenTelemetry GenAI semconv is still in Development. What you need to know about tracing prerequisites and hard limits of observing non-deterministic agents.
Wiring up traces, evaluating tool calls, and choosing between LangSmith, Langfuse, Phoenix, or raw OpenTelemetry GenAI are practical decisions with real trade-offs. This step shows how to instrument an agent end-to-end without locking yourself into one vendor.
Tools & techniques

An AI agent can degrade for weeks with no deploy, no exception, and no run you can replay. Map which reliability instincts transfer from distributed systems and where they break.

Instrument a production AI agent with LangSmith, Langfuse, and OpenTelemetry GenAI semconv in 2026 — span design, SDK choice, debug-readiness.
The observability stack for agents is consolidating fast — vendors are being acquired, standards are stabilizing, and the line between LLM evals and APM is dissolving. This step tracks what is shifting and which platforms are pulling ahead.
Models & benchmarks
Updated May 2026

ClickHouse bought Langfuse. Braintrust raised $80M at $800M. Datadog folded agents into APM. What the 2026 agent observability split means for AI teams.
Recording every prompt, tool call, and intermediate output means recording every secret, PII fragment, and customer message the agent ever sees. This step examines the privacy, retention, and consent questions you inherit the moment you turn tracing on.
Risks & metrics

Agent observability captures every prompt, tool call, and screenshot. The privacy cost stays invisible — until the panopticon turns visible.