Your dashboards stay green while the agent is wrong
Classic monitoring asks whether the request succeeded and how fast. For an agent that misses the point: the endpoint returns 200 OK on time while the answer quotes a refund policy you retired in spring, and nothing in APM knows what the right answer was.
Agents also loop, call the same tool four times with slightly different arguments, or announce that a task is done when it isn't. The researchers behind the MAST taxonomy annotated more than 1,600 traces from seven multi-agent frameworks and sorted the failures into 14 modes. One of their three top-level categories is task verification: the system finishes without checking that the job was actually done.
Most teams know this in principle. LangChain's State of Agent Engineering (1,340 responses, fielded in late 2025, published June 2026) found that 89% of respondents have some form of observability and 62% trace individual steps and tool calls, yet only 37.3% evaluate live traffic. It is a vendor survey (LangChain sells LangSmith), but the gap is real. The failure classes themselves (stale context, invented facts, folding at peak load) have their own post-mortem. This piece is about catching them.
In agent observability, the unit is the run, not the request
A run is one task from start to finish: the user's question, every model call and tool call the agent made to answer it, and the way it ended. In tracing terms the run is a trace and each step is a span nested inside it. Per-request logs show eight model calls; only the trace shows they were one confused attempt at a single refund.
The spans worth having are few: model calls, tool calls, retrieval, memory reads and writes, handoffs to another agent, and human approvals. Framework SDKs already think this way: the OpenAI Agents SDK wraps each Runner.run() in a trace and emits spans for agent runs, generations, function tool calls, guardrails, handoffs, and speech-to-text and text-to-speech audio.
On the root span, record agent build, prompt version, model id, tool schema version, a pseudonymous user id, total tokens and cost, and how the run ended, as one field with fixed values: success, turn limit, budget cap, tool error, abandoned. A run that ran out of turns and apologized nicely is still a failure.
One trap is easy to miss. Tracing SDKs ship spans in the background so the agent doesn't wait on uploads, and LangSmith's support team explains the "incomplete" status this produces: if the process exits before the upload finishes, the end event never arrives, and the fix is calling wait_for_all_tracers() before exit. So the crashed run you most need is the one most likely to be cut short: flush on shutdown and on every error path.
How do you monitor AI agents in production? Start with these signals
The minimum we would wire on any agent before real users touch it. Starting alerts are relative on purpose: set them from your own first two weeks of traffic.
| Signal | Where it lives | What it catches | Starting alert |
|---|---|---|---|
| Run outcome | Root span: one field, fixed values | Silent give-ups, turn-limit and budget stops | Page if non-success endings double against the 7-day baseline |
| Steps per run | Root span: counts of model and tool calls | Loops, runaway retries | Hard cap in code; investigate runs above your p99 |
| Tokens and cost per run | Model spans, summed on the root | Prompt bloat, silent model swaps, cost drift | Weekly trend; hard budget cap per run |
| Latency per step | Duration on every span | Which step ate the time budget | Investigate when a step's p95 exceeds its share of the budget |
| Tool call result | Tool span: name, arguments, status, duration | Bad arguments, timeouts, expired credentials | Page on any write-tool error; per-tool error rate over baseline |
| Retrieval result | Retrieval span: query, doc ids, scores, count | Answers built on nothing | Investigate a rise in empty or low-score retrievals |
| Versions | Root span: model, prompt, tool schema, build | Regressions after a deploy | Compare outcomes and eval scores before and after each change |
| Human approval | Own span: approver, decision, time to decide | Unreviewed writes, rubber-stamping | Page on any write without an approval record |
| Quality score | Score on the trace (eval or user flag) | Wrong but fluent answers | Weekly trend; investigate drops per prompt version |
| Message content | Opt-in attributes, masked before export | Everything else, when debugging | None: this one is a privacy decision (see below) |
If a week is all you have, start with run outcome, tool results with their arguments, and versions on the root. Together they turn "the agent was weird yesterday" into a query you can run.
Tool calls are where agents actually fail
A model call that goes wrong produces a bad paragraph. A tool call that goes wrong changes something: a ticket closed, an email sent, a record overwritten. Every tool span should carry the tool name, the arguments exactly as the model produced them, the validation result, the response status and the duration. Keep arguments even on success: the classic agent bug is a valid call with the wrong customer id.
Track error rates per tool and per class (bad arguments, timeout, auth, upstream 5xx): a healthy average can hide one tool failing since a partner rotated an API key.
Writes need two more fields. An idempotency key, so a retried run cannot send the same refund twice and you can prove it didn't. And an approval record when a human gate sits in front of the action: who approved, what exactly they were shown, the decision and how long it took. Log the approval as its own span, not as a note on the tool span. Approval time shows whether people review or rubber-stamp, and every rejection is a clean quality label.
Which tools may write at all is a permissions question, and connecting AI agents to your data covers the boundary: reading can be autonomous, writing goes through a gate. Observability is how you show the gate held.
Quality never shows up in the error rate
An answer can be wrong without anything erroring, and the only way to see it is to score it. Online, an evaluator (a rule, a model acting as judge, or a user's thumbs-down) scores a sample of live traces. Offline, a golden set of real questions with known good answers runs against every prompt or model change before it ships.
Sampling keeps the judge bill sane. HoneyHive's monitoring guide (updated 1 November 2026) suggests scoring all traffic under 1,000 events a day, 25-50% between 1,000 and 10,000, and 5-25% above that, while always capturing failed requests. That is one vendor's starting point, not a standard. Whatever the rate, keep failed and flagged runs at 100%.
Build the golden set from traces, not from imagination. Each time an eval or a user flags a run, copy the input and the corrected answer into the set. The specific checks for invented facts, such as groundedness per claim and a log line for empty retrieval, are laid out in how to catch AI hallucinations.
Watch the bill too: in LangSmith, an online evaluator that scores a trace while retention extension is enabled upgrades that trace to extended retention, which costs extra.
AI agent monitoring: alerts worth waking up for
When everything pages, nothing does. Sort alerts into tiers before writing the first rule.
| Tier | Trigger | Examples |
|---|---|---|
| Page now | Harm is happening or about to | Write-tool error, write without an approval record, cost per run over the hard cap, failed run outcomes doubling, model provider outage |
| Investigate today | Something drifted | A step's p95 over its budget share, one tool's error rate above baseline, empty retrievals rising, more approvals rejected |
| Trend weekly | Slow change | Eval scores per prompt version, tokens per run, steps per run, cost per successful run |
Latency needs a budget per step, not one number for the whole run. Write down the end-to-end target and split it across the steps: speech-to-text, first model call, each tool, final model call and text-to-speech for a voice agent, or retrieval and model calls for a text one. Then alert on the step that overspends. Knowing the CRM lookup was slow is something you can fix before lunch; knowing the run was slow is not.
HoneyHive's guide says the thresholds are yours to set from your own baseline. The exception is the cost cap per run: put it in code on day one, then move it just above the longest legitimate run you observe.
Use the OpenTelemetry GenAI semantic conventions, and pin the version
The vendor market is moving fast, which is the strongest argument for instrumenting through OpenTelemetry. Langfuse is built on OpenTelemetry and accepts OTLP, and Arize Phoenix is built on OpenTelemetry and OpenInference, so OTel-instrumented code can switch backend with a config change rather than a rewrite.
Know what you are standardizing on, though. In release v1.42.0 on 12 June 2026, OpenTelemetry deprecated every gen_ai.* attribute, metric, event and span in the core conventions repo and moved them to a dedicated semantic-conventions-genai repository. On 13 November 2026 that repo shows no tagged releases, and its schema URL section still reads "TODO". The agent spans spec is marked Development and names operations such as invoke_agent, invoke_workflow and plan. Expect names to keep moving.
So pin it. Lock the instrumentation library version, record the convention version you emit as a resource attribute, and treat an upgrade like a schema migration: check dashboards and alert queries against the new names before you deploy. Note that message content (gen_ai.input.messages, gen_ai.output.messages) is Opt-In, with the warning that it is "likely to contain sensitive information including user/PII data". The standard keeps it off by default for a reason.
Your traces are a copy of your customers' data
A support agent's trace holds the customer's message, their order history and the answer. That is usually personal data under the GDPR, so your observability vendor is a processor that needs a DPA, a region and a retention policy, like your CRM.
The defaults lean the other way. In the OpenAI Agents SDK tracing is on by default and trace_include_sensitive_data defaults to True, which stores the inputs and outputs of model generations and function calls. Audio spans include base64-encoded PCM of the input and output audio unless you switch off trace_include_sensitive_audio_data, so a voice agent can end up with recordings of people's voices in its trace store.
Most of the fix is configuration. Mask in your own process, before export. Langfuse's SDKs take a masking function (mask_otel_spans in Python, mask on the LangfuseSpanProcessor in JS/TS), and its masking docs warn that collector-side masking only happens after data has left the application. LangSmith offers `LANGSMITH_HIDE_INPUTS`, `LANGSMITH_HIDE_OUTPUTS` and a regex anonymizer that also run client-side. Attach a pseudonymous user id to every trace so a deletion request is one query; Langfuse documents deletion through its API, usually complete within 15 minutes.
Choose the region when you sign up, because neither Langfuse nor LangSmith migrates data between regions later. LangSmith's EU region runs on Google Cloud, but LangChain has no EU legal entity for contracting.
Then write down a retention number. If the agent counts as a high-risk system under the EU AI Act, Article 19 and Article 26(6) require keeping its automatic logs for at least six months, unless other law, data-protection law in particular, provides otherwise, from 2 December 2027 for Annex III systems. Most business agents are not high-risk; the AI Act guide helps you check.
What tracing costs: five vendors, five billing units
Each vendor bills a different thing. List prices below were retrieved on 13 November 2026; check the vendor page before you budget.
| Tool | Billing unit | Free tier | First paid tier | Retention |
|---|---|---|---|---|
| Langfuse Cloud | Units: every trace, observation and score | 50k units, 2 users | Core $29/mo: 100k units, then $8 per 100k | 30 days (Hobby), 90 (Core), 3 years (Pro, $199/mo) |
| LangSmith | Traces | 5k base traces, 1 seat | Plus $39/seat/mo: 10k base traces, then pay-as-you-go | 14 days base; 180 extended, at an extra fee |
| Datadog | LLM spans only; tool and retrieval spans not billed | 40k LLM spans | Pro $160/mo on annual terms: 100k LLM spans, then $3.50 per 10k | 15 days on Free; 30/60/90-day add-ons from $6.50 per 10k |
| Braintrust | GB processed, plus scores | 1 GB, 10k scores | Pro $249/mo: 5 GB, 50k scores, then $3/GB | 14 days (Starter), 30 (Pro), up to 180 at $0.50/GB/mo |
| Arize AX | Spans, plus GB ingested | 25k spans, 1 GB | Pro $50/mo: 50k spans, 10 GB | 15 days (Free), 30 (Pro) |
A worked month shows why the unit matters. Assume 1,000 runs a day, so 30,000 a month, and each run is one trace with five model calls, eight tool calls, one retrieval and one eval score. This is list-price arithmetic, not a measurement.
Langfuse Core: 16 units per run, 480,000 in the month. $29 plus 380,000 extra units at $8 per 100k comes to about $59, with 90 days of access.
Datadog Pro, annual terms: only the five model calls bill, so 150,000 LLM spans. $160 plus five blocks of 10k at $3.50 is about $178. Tool spans are free here and billed everywhere else.
LangSmith Plus, one seat: 30,000 traces, 20,000 above the included 10,000. The overage rate is not on the public pricing page today, so the figure is $39 plus whatever your billing settings show.
Braintrust and Arize AX: both depend on payload, and Arize does not list overage. At 20 KB per run the month is 0.6 GB, inside Braintrust's free gigabyte; if each run drags 200 KB of retrieved context, it is 6 GB and past Pro's 5 GB. Arize AX Pro includes 50k spans; this month produces 450,000.
W&B Weave also bills by data volume: its pricing page, now on CoreWeave's site, lists 1 GB a month free and Pro from $60 with 1.5 GB included, then $0.10 per MB.
Picking LLM observability tools while the market consolidates
The company running your tracing tool today may not be running it next year. ClickHouse took over Langfuse in January 2026, promising no licensing changes and self-hosting as a first-class path. Mintlify acquired Helicone in March and put it in maintenance mode, offering to help customers move elsewhere. Cisco completed its purchase of Galileo in May and is folding it into Splunk Observability. We would still use a vendor. We would just keep the instrumentation portable enough to leave.
For LangSmith alternatives, Langfuse vs LangSmith comes down to hosting more than features: Langfuse is open source and self-hostable, while LangSmith is cloud-first, with hybrid and self-hosted deployment only on Enterprise.
| Tool | Licence and hosting | Fits when | Watch for |
|---|---|---|---|
| Langfuse | MIT except ee folders; cloud US/EU/JP or self-host | You want EU data or self-hosting with an exit | Self-host means running Postgres, ClickHouse, Redis and S3; some features need a licence key |
| LangSmith | Cloud US/EU; hybrid and self-host on Enterprise | You already build on LangChain or LangGraph | No EU contracting entity; 14-day base retention |
| Arize Phoenix | Elastic License 2.0; pip, Docker or Helm | You want a local, OTel-native trace viewer | Read the ELv2 terms if you plan to host it for others |
| Arize AX | Cloud US/EU/CA; self-host on Enterprise | A managed platform for a larger team | Overage not listed on the pricing page |
| Datadog | Cloud, inside an existing Datadog account | You already run APM there | Bills LLM spans only; agent views live next to infra dashboards |
| Braintrust | Cloud plans billed by GB | Eval-heavy teams | Large RAG payloads move the bill |
| W&B Weave | Cloud; private hosting options on Enterprise | You already track experiments in W&B | Per-MB billing above the included volume |
| Helicone | Open source, maintenance mode since March 2026 | Existing users only | Plan the migration |
Self-hosted vs SaaS is mostly a question of who restarts ClickHouse at 3 a.m. Langfuse's self-hosting guide lists web and worker containers plus PostgreSQL, ClickHouse, Redis or Valkey, and S3-compatible storage. If nobody on the team runs that stack already, an EU cloud region with a DPA is often the safer privacy choice. If a contract says traces never leave your infrastructure, self-host and budget the ops time.
What to wire this week
None of this needs a platform decision first. On an agent that already runs, a week of work looks like this:
1. Give every run a trace id and an outcome field. Set it in code on every exit path, errors and turn limits included.
2. Put versions on the root span. Without them a regression and random noise look the same.
3. Log every tool call with its arguments and status. Add an idempotency key on writes and a separate span for each human approval.
4. Flush on shutdown and on errors. Then kill the process mid-run on purpose and check that the trace arrived.
5. Mask before export and fix the region. Switch off default raw content capture, attach a pseudonymous user id, write down the retention period.
6. Start a golden set of 20 real questions. Pull them from traces and run them before every prompt or model change.
7. Write a latency budget per step and a cost cap per run. Alert on the step, not the total.
8. Price your own month. Count spans and payload per run from one day of traces and run them through the table above.
One lesson from our own work. In the Race Engineer, a voice agent that answers an iRacing driver in under two seconds using 19 MCP tools, the agent deliberately keeps only the driver's question and its final answer in context (MAX_HISTORY = 4). Every intermediate tool call runs fresh and is then discarded, because a lap time from 30 seconds ago is already wrong. Right for answers, but it means the conversation history is not a record of what the agent did: tool calls dropped from context exist only if something logs them separately, and the same goes for the driver's confirmation at the human gate on pit commands. If your agent trims its memory, make sure your logs don't.
And if you'd like a second pair of eyes on what your agent records before it goes live, that is part of our free audit.
FAQ
What is AI agent observability?
It is recording each agent run as a trace, with a span for every model call, tool call, retrieval and human decision, plus the versions in play and how the run ended, so you can explain why it produced the result it did. LLM observability usually stops at the model call; agent observability adds the tools and the loop.
How do you monitor AI agents in production?
Trace every run and record its outcome, log tool calls with their arguments, score a sample of live traces with evals while keeping every failed run, and alert in tiers: page on harmful writes and cost runaways, investigate drift the same day, review quality trends weekly.
Does tracing slow down an AI agent?
The common SDK design avoids it: LangSmith's SDK, for example, sends traces from a background thread so the agent doesn't wait for uploads. The catch: a process that exits early can lose the end of a trace, so flush before shutdown.
Langfuse vs LangSmith: which should I pick?
If you build on LangChain or LangGraph and are comfortable in a vendor cloud, LangSmith fits naturally. If you need self-hosting or an open-source licence, Langfuse is the usual alternative. Either way, instrument through OpenTelemetry where you can, so the choice stays reversible.
- 13 November 2026Published.