The Observability Gap: Why Your AI System Needs More Than Logs
Standard APM tells you the request finished. Not which tool the agent chose, what it retrieved, or why the answer drifted. Agent tracing differs.
Your monitoring dashboard shows green. Latency is within bounds, error rates are normal, and the last deployment went smoothly. Then a customer writes in to say the agent gave them a confident, well-formatted answer that was completely wrong.
Standard APM reported a success. It was not.
This is the observability gap in AI-native systems. Traditional monitoring instruments the plumbing: request duration, error counts, CPU, memory. It tells you whether the system responded. It cannot tell you whether the system reasoned correctly, retrieved relevant context, or chose the right tool for the task. In a deterministic service, those questions collapse into one — if the code ran without error, the output is correct. In an agent system, they are entirely separate questions, and conflating them is how quality regressions hide in plain sight.
What APM cannot see
Application performance monitoring tools are built on a reasonable assumption: the code is deterministic, so observing the execution is sufficient for understanding the outcome. If the function returned without error, the behaviour was correct. Correctness is structural.
Agent systems break this assumption at the foundation. A request to an agent triggers a sequence of decisions: which tools to call, what arguments to pass, which retrieved chunks to incorporate into reasoning, and how to synthesise the output. Each decision is probabilistic. The same input on a different day — after a model provider ships an update, after the retrieval index is refreshed, after the system prompt is changed — can produce a different sequence of decisions and a different output. APM instrumentation captures the HTTP call. It has no visibility into the decision sequence.
The practical consequence is that a broad class of agent failures is invisible to standard monitoring. The agent returns a plausible-looking result that misrepresents the source material. The retrieval pipeline surfaces stale documentation because an index refresh lagged behind a product update. The agent selects a tool that is technically applicable but not the right one for the task. None of these produce errors. All of them degrade the quality that users experience.
In the product roadmap piece, we noted that evaluation observability needs to be built as infrastructure before agents are handling consequential tasks at scale. That investment is not optional instrumentation. It is the detection system for the failures that standard monitoring cannot see.
The session is the unit of observability
The first structural shift in agent observability is the unit of analysis. Standard APM is call-level. A trace covers one request or one database query. Agent observability must be session-level.
A session is the full sequence of a task: the initial request, the planning step, each tool invocation (with the model's chosen arguments), each retrieval call (with the query issued and the chunks returned), the model inferences that synthesise retrieved context into a response, any human-in-the-loop gates, and the final output. The session trace preserves this sequence as a coherent unit. Individual call traces, viewed in isolation, tell you the parts were fast. The session trace tells you whether the task worked.
This distinction matters because agent failures are characteristically sequential. The wrong tool is selected in step two. The tool returns a result that is technically correct for the wrong task. The model incorporates that result into its reasoning and produces a response that is coherent but off-target. Call-level traces surface each of these steps as a success. Session-level traces surface the pattern: the right call to the wrong tool.
The session trace should capture, at minimum: every LLM inference call with the full prompt (system, user, and tool results), token counts, model version, and raw response; every tool invocation with the model's argument choices, the tool's return value, and latency; every retrieval call with the issued query, the returned chunks, and their relevance scores; and any human approval events, including what the agent presented, what the human decided, and the elapsed wait time.
LangSmith, Langfuse, and the OTel layer
Three categories of tooling address this instrumentation problem, and they are complementary rather than competing.
LangSmith is built by LangChain and integrates deeply with LangChain and LangGraph runtimes. Instrumentation is close to automatic for teams already using those frameworks. The trace hierarchy (sessions as parent runs, agent steps as child runs, LLM calls and tool invocations as grandchildren) is native to the tool. LangSmith's most distinctive capability is the connection between traces and evaluation: you can select production sessions, annotate them, promote them to evaluation datasets, and run those datasets against new model versions or prompt changes. This closes the loop between observability and quality measurement in a way that purpose-agnostic tools require custom work to achieve. The trade-off is framework specificity — teams not running LangChain will need adapters.
Langfuse is open source, self-hostable, and framework-agnostic. The instrumentation model is based on a trace-observation hierarchy that aligns with OpenTelemetry conventions: a Trace represents a session, Observations represent steps, and Generations are first-class objects for LLM calls with native support for recording prompts, model responses, token counts, and cost. Langfuse maintains a prompt registry where prompts are versioned and linked to the traces they produced — useful for diagnosing whether a quality regression correlates with a prompt change. The self-hosting option is significant for teams with data residency requirements, and the OTel alignment makes it a natural complement to existing APM stacks rather than a replacement.
OpenTelemetry is the CNCF standard for distributed tracing, and its GenAI Semantic Conventions (stabilised in 2025) define standard attribute names for LLM calls: model identifier, token counts, prompt and completion content, and cost. For teams already running OTel-based APM — Datadog, Honeycomb, Grafana — these conventions mean LLM call telemetry flows into the same backend as service traces, with automatic correlation. The gap relative to purpose-built tools is session structure: OTel captures LLM call metadata well, but the hierarchical agent session trace requires custom span design. Purpose-built tools handle this natively; OTel requires the team to design and maintain the span hierarchy.
The practical synthesis most production teams reach is to run both layers. OTel covers infrastructure-level telemetry: latency, error rates, cost aggregates, correlation with service dependencies. A purpose-built agent trace tool covers session-level observability: decision sequences, tool selection patterns, retrieval quality, task completion rates. These answer different questions, and the teams that try to answer both with one tool usually end up with good infrastructure monitoring and poor agent-specific insight.
What agent traces make possible
The operational capabilities that session-level observability unlocks are worth being concrete about, because the abstract case for "better observability" is easy to dismiss and the concrete case is harder to ignore.
Prompt and model regression detection. When a model provider ships an update or you change a system prompt, compare session trace distributions from before and after the change. Task completion rates, tool selection frequencies, and retrieval relevance scores will reveal quality shifts before they surface in customer feedback. Eval-driven development and agent tracing are complementary here: evals measure quality against a test set; session traces measure quality against the production distribution.
Tool selection debugging. If an agent is consistently selecting the wrong tool for a class of task, this appears in traces as a pattern: a specific input distribution consistently producing the same tool selection error. Diagnosing this from user feedback alone requires guesswork. Diagnosing it from session traces takes a filter and a sort.
Retrieval quality monitoring. Track the relevance scores of retrieved chunks over time. A declining average relevance score is a leading indicator of retrieval degradation, often from data staleness or index drift, before users notice the quality change. This connects the observability layer to the context layer of the AI-native stack: retrieval quality is only observable if you are capturing what was retrieved and scoring it.
Cost attribution by task type. Some task types consume an order of magnitude more tokens than others. Session traces with cost attribution make this visible by task category, which enables model routing decisions: simpler, high-frequency tasks routed to smaller models; complex tasks that require frontier reasoning kept on larger ones. This is the observability layer connecting to the economics layer — without it, cost optimisation is guesswork.
The frame of reference problem
The tooling is available. The more common failure is not teams without access to observability tools — it is teams with good APM who believe they have good observability.
A useful diagnostic: what does your current observability tell you when the agent produces a wrong answer? If the answer is "latency and error rates, and from there we rely on user reports," you have infrastructure monitoring, not agent observability. The session trace is what you are missing.
Orchestration runtimes produce the structured execution context that agent tracing instruments. When the workflow engine records that a step was completed, the agent trace captures what happened inside that step. The two layers are designed to compose: the runtime manages durable execution; the observability layer makes that execution legible after the fact.
Standard APM tells you the request finished. Agent tracing tells you what the agent decided, what it retrieved, what it chose to do, and whether the task worked. Building a system you cannot see is not a viable operating posture for software that acts on behalf of users. The gap between those two statements is the gap worth closing.