AI agent observability is the practice of collecting, correlating, and analyzing telemetry data emitted by autonomous AI agents and multi-agent systems so that engineers can understand internal state, debug failures, audit decisions, and monitor performance over time. The telemetry involved spans the familiar four pillars — traces, logs, metrics, and events — but extends each one to cover signals unique to agentic behavior: LLM prompt and completion pairs, tool and function call trees, memory reads and writes, inter-agent message passing, and non-deterministic reasoning chains that branch and revise themselves mid-run.
Organizations deploying agents in production quickly discover that traditional observability tooling answers the wrong questions. A microservice either returns HTTP 200 or it does not. An agent can return a result that looks correct, follow a twelve-step reasoning path to get there, exhaust three times the expected token budget along the way, and silently retry a failing tool call twice before succeeding — all without triggering a single conventional alert. Gartner projects that by 2028 more than one-third of enterprise software applications will include agentic AI capabilities, up from under one percent in 2024. That growth means the operational and compliance demands around agent behavior will intensify quickly, and teams that instrument now build the institutional knowledge to handle it at scale.
Key Takeaways
- AI agent observability extends conventional traces, logs, and metrics to cover LLM token usage, tool call trees, memory state, and multi-agent coordination signals that standard instrumentation ignores.
- OpenTelemetry's experimental GenAI semantic conventions provide a vendor-neutral starting point for structuring agent spans, including standardized attributes for token counts, model names, and prompt content.
- High-volume agent deployments generate append-heavy, high-cardinality telemetry at a rate that makes cost-efficient, columnar time-series storage a practical requirement rather than a preference.
Unlike a null-pointer exception with a deterministic stack trace, agentic failures often emerge from a sequence of individually valid steps that combine badly. A hallucinated intermediate result, a tool call that returns an ambiguous response, or a plan-revision loop can cascade silently across dozens of spans before surfacing as a wrong answer or a timeout. Without span-level traces capturing each reasoning step, engineers have no reliable way to reconstruct what the agent actually did.
LLM API calls, retrieval-augmented generation steps, and memory operations each carry a per-token or per-call price. At scale, high-volume LLM serving can generate hundreds of thousands of inference events per day per deployment, and those events map directly to spend. OpenTelemetry's GenAI semantic conventions expose gen_ai.usage.input_tokens and gen_ai.usage.output_tokens as standard span attributes precisely so teams can aggregate token costs by user, tenant, task type, or team rather than staring at an undifferentiated API bill.
The EU AI Act (Regulation 2024/1689), in force since August 2024, imposes logging and traceability obligations on providers of high-risk AI systems. Full replay of an agent's reasoning chain — every prompt, every tool call output, every plan revision — is exactly the kind of artifact those obligations require. Building that capability retroactively after a compliance inquiry is far harder than designing it in from the start.
When an orchestrator agent dispatches sub-agents over HTTP or a message queue, context must propagate across process boundaries. The W3C Trace Context specification, which OpenTelemetry uses for propagation, makes this possible by carrying trace and span identifiers through request headers. Without that propagation, each agent's telemetry appears as an isolated island, and cross-agent latency or error analysis becomes guesswork.
Non-determinism breaks conventional testing assumptions. The same agent prompt can produce structurally different reasoning paths on successive runs. That variability makes it hard to define what a "normal" trace looks like, which in turn makes anomaly detection and regression testing more complex than they are for deterministic services.
Telemetry payloads are large. Prompt and completion text can run to thousands of tokens per LLM span. A single agent run involving ten LLM calls and five tool calls can generate twenty to fifty spans plus multi-kilobyte log payloads. At thousands of runs per day, this easily reaches tens of gigabytes of raw telemetry daily. Platforms priced on indexed data volume become expensive fast — a dynamic the Jevons Paradox framing for observability costs describes clearly.
Instrumentation maturity is uneven. OpenTelemetry's GenAI semantic conventions remain in experimental status. Community libraries such as OpenLLMetry and OpenInference fill gaps but evolve quickly. Teams adopting any of these today should expect the specification to shift through 2025 and plan for schema migrations accordingly.
Memory and state are hard to represent. Conventional spans model request-response pairs well. Agent memory — a vector store read that shapes a reasoning step three turns later — has no natural home in the standard trace model. Teams often resort to custom span attributes or structured log events to capture memory state snapshots, which requires discipline to apply consistently.
Start with OpenTelemetry as the instrumentation foundation. The OTel Collector's fan-out pipeline architecture lets you route agent telemetry to a hot observability backend for real-time alerting and a long-term store for cost analysis and compliance replay simultaneously, without changing application code when backends change.
Instrument at the framework level first. LangChain's callback system fires at each chain, LLM, tool, and agent step and is the lowest-friction entry point for Python-based agents. Google's Agent Development Kit and Anthropic's Model Context Protocol emit structured per-step events that map cleanly to OTel spans. LangSmith offers a purpose-built commercial option if you want a faster path to a working dashboard before investing in a custom pipeline.
Use OTel baggage propagation to attach user_id, tenant_id, and task_type at the entry point of every agent run. Those attributes flow into every child span automatically, enabling cost attribution and per-customer SLO reporting without additional instrumentation effort downstream.
Define SLIs before going to production: end-to-end p95 run latency, task success rate, token count per completed task, tool call error rate, and retry or loop rate. These five signals require span-level telemetry to compute accurately. Aggregate metrics alone will miss the pathological cases — the runs that succeed eventually but only after burning ten times the expected budget.
How is AI agent observability different from traditional distributed tracing?
Traditional distributed tracing captures synchronous or asynchronous service calls with well-defined inputs and outputs. AI agent tracing must additionally capture LLM prompt and completion pairs, non-deterministic branching when an agent revises its plan, tool call trees, and memory state changes. The OpenTelemetry GenAI semantic conventions extend the standard span model with agent-specific attributes to handle this, though the specification remains experimental.
What does the OpenTelemetry GenAI spec actually cover?
The spec defines span attributes for LLM calls including model name, input and output token counts, finish reason, and prompt content. It covers both LLM spans and, increasingly, tool call and agent spans. The OpenInference specification from Arize AI complements it with conventions for retrieval, embedding, and agent action spans that the core OTel spec has not yet standardized.
How do I attribute LLM token costs to specific teams or users?
Attach `user_id`, `tenant_id`, and `team` as span attributes via OTel baggage propagation at the start of each agent run. The GenAI conventions then expose `gen_ai.usage.input_tokens` and `gen_ai.usage.output_tokens` per LLM span. Querying those attributes in a telemetry backend produces accurate cost attribution dashboards rather than an undifferentiated API bill split by percentage estimates.
What SLOs should I define for a production agent?
Track five signals: p95 end-to-end agent run latency, task success rate, average tokens per completed task, tool call error rate, and retry or loop rate. Token count per task serves as a cost proxy and catches prompt bloat or reasoning loops before they appear on the invoice. All five require span-level granularity; aggregate metrics will not surface the outlier runs that drive most of the cost and most of the user complaints.
How should I store agent telemetry at scale?
Agent telemetry is append-heavy, time-stamped, and high-cardinality — a workload profile that maps well to columnar, time-series-oriented storage rather than index-everything platforms. Prompt and completion logs grow quickly, and log analytics architectures designed for high-throughput event streams handle the volume more cost-effectively than general-purpose search indexes. A data lake tier for long-retention compliance replay, paired with a hot tier for real-time querying, is a practical two-layer approach for most production deployments.