Production Learning Review

Which Observability Platforms Expose Per-Layer Error Rates Across Prompt Tool Workflow and Memory as First-Class Metrics

LangSmith and Phoenix come closest, but no platform covers all four layers.

· 9 min read
Cover illustration for “Which Observability Platforms Expose Per-Layer Error Rates Across Prompt Tool Workflow and Memory as First-Class Metrics”
Production Signal Theory · November 16, 2026 · 9 min read · 1,927 words

AI agent failure attribution by harness layer requires explicit prompt, tool, workflow, and memory boundaries, with dedicated metrics alongside searchable traces. LangSmith and Arize Phoenix come closest with structured evaluation and replay, but none of the platforms reviewed has first-class metrics for all four layers. In practice, trace-first attribution finds the first divergence, then uses replay to test whether a change to the harness fixes it.

Why undifferentiated traces leave engineering teams with failure signal they can't use

An agent returns HTTP status 200 and a wrong answer. Traditional APM reports a successful request because it tracks status and latency while leaving the correctness of model calls, tool invocations, and sub-agent handoffs unmeasured. The error rate can remain at zero. A hallucinated answer is therefore not just an undetected exception but a failure outside the conventional definition of an error.

Nonlinear runs form directed graphs rather than trees, frameworks have no shared data model, and a rise in cost can point to trouble that APM does not capture. Correctness itself is undefined for an arbitrary text response. Even when an error is visible in a trace, its cause may lie several actions earlier, so engineers with an undifferentiated trace must search for where it began before they can measure it.

What "per-layer error rate" actually means and why the layer boundary matters

A per-layer error rate needs a clear boundary around what can fail, which teams can query. The prompt layer primarily fails semantically, through instructions that lead to invalid tool arguments or repeated attempts without raising exceptions. Argument-validity tracking at tool-call time and retry frequency provide signals here. Neither alone proves that the prompt caused the failure.

The tool layer needs rates of success and failure for each tool type, counts of calls per session, and how often calls retry. The OpenTelemetry GenAI semantic conventions define gen_ai.execute_tool.duration for tool execution time and gen_ai.invoke_agent.tool_calls for calls per agent run. Elevated retries can indicate upstream prompt ambiguity rather than an unstable tool, so attribution must preserve the link between the instruction and the call.

The workflow layer requires step counts and configurable loop-depth thresholds because a loop may produce only a long trace, rising token cost, and a delayed response. The convention gen_ai.invoke_agent.inference_calls supplies a model-call count that can help detect looping. More than 8 reasoning loops per run is a named stuck-agent indicator. Memory is a separate boundary, covering reads and writes to vector stores or episodic memory, but no reviewed platform exposes those failures as a named, first-class metric.

The difference between a platform that surfaces layer failures and one that lets you find them

A first-class metric is a dedicated, queryable aggregate in a dashboard. The practical distinction is independent alerting. A team should be able to configure per-tool failure rates, per-workflow loop depth, and per-prompt retry rates without constructing each measurement from raw attributes. The layer must exist as a dimension in the metrics system.

Producing that distinction requires step-level instrumentation and involvement in the execution path. Depth has a cost in overhead and billing. Span-based pricing can serve as a proxy for instrumentation depth because it counts more of the execution detail than trace-based pricing, but it is not proof of attribution capability. The decisive evidence remains what the platform aggregates and exposes.

How the leading platforms handle per-layer attribution in practice

LangSmith connects production traces to evaluation datasets through annotation queues, with reruns against new model versions built into the product. Its depth comes from framework integration. It is strongest for LangChain and LangGraph teams, although that coupling also constrains its fit elsewhere. The production-pipeline overhead benchmark found virtually no measurable overhead, while step-count monitoring and configurable thresholds support workflow-loop detection.

Arize Phoenix exposes project dashboards for latency quantiles, token usage, cost, and error rates. Its span replay loads a traced LLM call into a prompt playground for reruns with changed prompts or parameters, bringing replay-based investigation into the open-source tier. It also supports step-count monitoring and configurable loop thresholds. Native LLM-as-judge metrics and RAG evaluation extend quality analysis, but per-tool error rates for production monitoring at scale require the commercial Arize AX layer.

Datadog LLM Observability is strongest where agent failures need to be correlated with an existing application and infrastructure estate. It connects agent signals with application traces, logs, security signals, incidents, and service ownership, and natively supports OTel GenAI conventions v1.37+. Token metrics distinguish input, output, reasoning, prompt, and prompt-cache tokens, with estimated cost per span. Collection is not the limiting step here. Layer-specific interpretation and alerting require more configuration than in agent-native platforms because attribution comes from correlating gen_ai.* spans with existing APM dimensions.

Langfuse provides structured session tracing, annotation workflows, dataset management, and basic evaluation, with the strongest token-level cost tracking in the reviewed field. Tool and prompt coverage comes through span-level annotation, while workflow-loop detection requires custom queries. That detail has measurable overhead. Its benchmarked overhead is approximately 15% in multi-step workflows, driven by prompt, output, and token tracing at every step, and its unit billing counts traces, observations, and scores. ClickHouse acquired Langfuse in January 2026, with current capabilities unchanged.

Opik provides an Apache 2.0, self-hostable stack with the backend included, combining tracing, evaluations, and guardrails. Its structured multi-agent traces preserve parent-child relationships, with cost and latency attribution at the agent level and scorers applied directly to traces. Teams need custom instrumentation on top of the base tracing layer to build dedicated aggregates, so it can serve this use case but takes more work. Helicone has been in maintenance mode since March 2026 for existing users only and is not recommended for new instrumentation.

What the OTel GenAI standard does and does not yet solve for layer attribution

The OTel conventions provide a shared vocabulary for agent spans. Values of gen_ai.operation.name, including execute_tool, invoke_agent, invoke_workflow, retrieval, and chat, provide useful layer tags. Tagging is only the collection foundation. The standard still acknowledges the challenge of reliably distinguishing workflows from single agents, which complicates workflow-level aggregation.

All GenAI conventions remain in Development status as of October 2026, so names can change. Teams whose instrumentation defaults to v1.36-era output should set OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental to access the newest experimental names. Instrumentations already emitting v1.37+ conventions by default do not need or honor that variable. Version behavior therefore belongs in both an instrumentation review and a backend review.

Content capture introduces another deliberate boundary. Attributes including gen_ai.input.messages, gen_ai.output.messages, gen_ai.tool.call.arguments, and gen_ai.tool.call.result are opt-in to protect privacy. That choice limits what automatic diagnosis can find unless teams opt in to capture the content it needs. OTel keeps backend selection reversible, but the platform must still turn collected spans into layer-specific aggregates and alerts.

The memory layer gap and schema drift: where no platform currently closes the loop

Teams must build dedicated metrics for read and write failures from raw span attributes because none of the reviewed platforms has a first-class memory-layer metric they can select. Without an explicit operation outcome, a memory boundary cannot participate in the same attribution framework as a tool call.

Schema drift causes a different kind of failure because the contract that breaks is between layers. An LLM can begin returning changed field names or nested shapes while a downstream parser silently coerces them, allowing user-facing behavior to degrade over days. No single layer necessarily records an error. Detecting this requires capturing gen_ai.tool.call.arguments, checking arguments against expected schemas, and comparing runs, which combines opt-in content capture with logic most platforms do not supply out of the box.

Workflow loops are better covered than either gap because their signatures already appear in call counts, cost, and duration. The practical response is explicit instrumentation. Teams should represent argument validity and memory operation outcomes as custom spans while native support remains unavailable.

How do you pinpoint which layer caused an agent failure?

A layer-tagged failure identifies where a problem was detected, with its origin still to be determined. Attribution requires following the trace back to the first divergence and examining the earlier decisions that shaped the failing action. This is a search problem across the trajectory. A tool exception alone leaves open whether the tool is broken or a working tool received arguments that came from unclear instructions.

AgentDebugX, published by Zhu et al. on arXiv in July 2026, treats that distinction as a research problem. Its DeepDebug component combines global trajectory understanding, structure-guided investigation, and cross-examination in multi-turn diagnosis, reaching substantially higher exact agent-and-step attribution accuracy than single-pass baselines on the same traces. Concurrent 2026 work including TRAJDEBUG, POIROT, AgenTracer, REFLECT, and Causal Agent Replay also focuses on trajectory-level attribution. These systems target more than endpoint alerting. Their shared focus supports a narrow conclusion for practitioners, which is that collecting detailed traces does not remove the need for a structured diagnosis workflow.

Replay-based validation as the bridge between observed failure and confirmed fix

A diagnosis becomes operationally useful when a proposed change can be tested against the production conditions that exposed the failure. A trace used for replay needs the user input, the system prompt, the tool calls and their arguments, and the tool responses or snapshots. Missing state weakens the test. Without those inputs, a successful rerun cannot establish that the original failure conditions were reproduced.

LangSmith turns captured production inputs into datasets and reruns the target function to test changes, including new model versions. It does not replay the recorded session state with tool results held fixed. Phoenix offers a narrower native mechanism, rerunning a traced LLM call in its prompt playground with different prompts or parameters. Both provide useful validation paths, but neither mechanism should be described as interchangeable with full state-controlled replay. When a platform has no native replay, teams must build that step using exported trace data.

Chronicle, published on arXiv in September 2026, formalizes cut-point replay by recording agent state at non-deterministic boundaries. It uses the record at some boundaries and runs the others live, so partial replay can show which layer caused a regression. Teams should combine a CI harness that blocks PRs regressing critical evaluation scores with a nightly run over a sample of yesterday’s production traces. Fixed datasets alone do not catch all drift. Prompt edits, tool-schema updates, and workflow restructuring can ship faster than model revisions because they require no weight update, but replay validation is what makes that shorter cycle safe.

What to look for when evaluating a platform for per-layer attribution

A vendor evaluation should begin with a demonstration of independently alertable per-tool failure rates, per-workflow loop depth, and per-prompt retry rates. Next, check whether gen_ai.operation.name, or its equivalent, is a first-class metrics dimension for filtering and grouping without custom aggregation.

Replay support should then be tested against modified prompts, tool schemas, and workflow structure, with clear distinctions between rerunning inputs, replaying a single span, and preserving recorded state. Teams also need to check overhead and pricing in that same multi-step context. A platform’s cost model should be evaluated against the instrumentation depth the team actually needs, accounting for the additional detail beyond a minimally traced request. Otherwise, the evaluation measures a cheaper configuration than the attribution workflow requires.

Teams must also decide how to self-host when data residency and audit requirements call for it. Langfuse offers an MIT core, Phoenix uses Elastic License 2.0, and Opik and OpenLIT are available under Apache 2.0. Deployment control does not fill attribution gaps. Teams still need custom instrumentation for memory outcomes and schema validity, regardless of backend choice. The most durable decision is to collect OpenTelemetry gen_ai.* spans from the outset, keeping the backend reversible as platform capabilities evolve.

Sources

  1. AgentDebugX: An Open-Source Toolkit for Failure Observability,

More in Production Signal Theory