Skip to content
Request a free consultation
AI Observability: What to Monitor, How to Trace Agents and How to Set It Up

AI Observability: What to Monitor, How to Trace Agents and How to Set It Up

Which quality, drift, latency, cost and safety signals to track, how agent and tool traces work under OpenTelemetry, and how to log prompts without risking data.

AI observability is the practice of collecting and connecting telemetry from AI systems so a team can explain what a model or agent did, why it did it and what it cost. It covers the model call itself and everything around it: retrieved context, tool calls, the application and the infrastructure underneath.

A language model can return a fast, well-formed, confident answer that is wrong. This guide explains how AI observability differs from classic monitoring, which signals matter in production, how the OpenTelemetry GenAI conventions structure agent traces in 2026, and how to set it up without turning your logs into a privacy problem.

What AI Observability Means and How It Differs From Monitoring

Classic software fails loudly: an exception, a timeout, a 500 error. AI systems often fail quietly, with a plausible answer that is off-topic, outdated or unsafe, while latency and uptime look normal.

The cause is that model outputs are probabilistic. The same prompt can produce different responses, behavior shifts when the input mix changes, and a provider can update a hosted model under the same name. Monitoring tells you that something crossed a threshold. Observability lets you ask new questions after the fact: which prompt version was live, which documents were retrieved, which tool the agent called and what came back.

In practice, AI observability joins three views that used to live apart. Engineering sees latency, errors and throughput. Data and ML teams see quality and drift. Risk and security teams see policy violations, abuse and audit trails. The value comes from linking all three to the same request, so a complaint about one bad answer can be traced to its exact inputs and steps.

How AI Observability Differs From Classic APM

Application performance monitoring already collects metrics, events, logs and traces. AI observability keeps that MELT foundation and adds what a model call needs to be understood and judged.

The difference is mostly new fields on old signals. A span for a model call needs the model name, token counts and, when allowed, the prompt and response. For streaming answers, the useful latency number is time to first token.

QuestionClassic APM answers withAI observability adds
Is it up and fast?Uptime, latency, error rateTime to first token, time per output token
Is it correct?Status codes and assertionsEvaluation scores, groundedness, user feedback
What did it cost?Compute and host usageInput and output tokens per request, user and feature
Why did it do that?Stack traces and logsPrompt version, retrieved context, agent and tool steps
Is it safe?Security eventsPrompt injection signals, policy and content violations

What to Monitor in Production: Quality, Drift, Latency, Cost and Safety

Most production AI signals fall into four groups. Each group answers a different question and usually has a different owner, so define all four before you choose a tool or build a dashboard.

A two-by-two grid of four signal groups: output quality, drift and change, latency and cost, safety and policy.
Quality, drift, latency and cost, and safety each answer a different production question.

Output quality

Accuracy, precision and recall work for classifiers with labeled data. Generative answers need task-specific evaluation instead: whether an answer is grounded in the retrieved sources, follows the format, answers the question asked and avoids fabricated facts. Teams combine automated scorers, a fixed set of test questions run before every release, sampled human review and in-product feedback such as thumbs down or escalations to a person. For the failure that worries most teams, our guide to why LLMs hallucinate and how to reduce it covers the causes that quality checks should target.

Drift and change

Data drift means the inputs no longer look like what the system was built and tested on: new topics, new languages, longer documents. Behavior drift means outputs change with the same inputs, often after a model, prompt or retrieval index update. Track the distribution of input topics, refusal rates, response lengths and evaluation scores over time, and tag every change so a shift can be tied to a release.

Latency and cost

Measure time to first token, time per output token and end-to-end duration per step, because one slow tool call can hide inside a fast model. Attribute input and output tokens to a request, feature, model version and customer, so spend can be explained line by line. Runaway usage is also a security concern: OWASP lists unbounded consumption among its top risks for LLM applications and recommends rate limits, quotas and monitoring of resource use.

Safety and policy

Log signals that a request tried to override instructions, that retrieved content contained injected commands, that an output disclosed personal data or broke a content policy, and that a guardrail blocked or rewrote a response. A rising block rate is a signal in itself, either of abuse or of a guardrail that is too strict.

How to Trace Agent Steps, Retrieval and Tool Calls

An agent turns one request into many steps: planning, model calls, retrieval and tool calls that act on other systems. Without a trace that links them, a wrong outcome cannot be explained.

A hub labeled agent invocation with three spokes: planning step, retrieval step and tool call.
One trace ties every planning, retrieval and tool step back to the agent invocation that started it.

The working model is a tree. The root span is the agent invocation. Under it sit child spans for planning, each model call, each retrieval and each tool execution, with timing, inputs, outputs and errors recorded on each. When a user reports a wrong answer, the trace shows whether the model misread the question, retrieval returned the wrong document or a tool returned stale data.

Three details make agent traces useful: record each tool call with its arguments and result, because tools are where agents change real systems; keep the identity the agent acted as; and link multi-agent hand-offs into one trace. Traces are also how you check that an agent stayed inside its access rules; for designing those rules, see our guide to AI agent permissions and least privilege.

OpenTelemetry GenAI Semantic Conventions: The Shared Schema and Its 2026 Status

OpenTelemetry is the vendor-neutral standard. Its GenAI semantic conventions name spans, attributes and metrics for model calls and agents, so traces read the same in any backend that supports them.

The conventions define spans for inference, embeddings, retrieval, tool execution and agents, plus provider-specific notes for services such as OpenAI, Anthropic, AWS Bedrock and Azure AI Inference, and conventions for the Model Context Protocol. The OpenTelemetry GenAI agent spans specification defines operations such as create_agent, invoke_agent, invoke_workflow and plan, which map directly to the tree described above. Metrics cover operation duration, server request duration, time to first token and time per output token, along with token usage.

Two facts matter for planning in late 2026. In June 2026, release v1.42.0 of the core OpenTelemetry semantic conventions moved the GenAI conventions into a dedicated repository, deprecating the gen_ai definitions in the main one. And the agent spans document and the GenAI metrics are still marked Development, not Stable, so names and attributes can still change. Instrument through a library or collector you can update, and avoid hard-coding attribute names into reports you cannot easily revise.

The conventions also take a clear position on content. Prompts, responses, system instructions and tool definitions are opt-in attributes, and the specification warns that input messages are likely to contain sensitive information, including personal data. Content capture should be a deliberate decision per environment, not a default.

AI Observability Tools by Category

Tools differ less in what they collect than in where they started. Knowing the category tells you what a product does well and where you will still need another layer or some custom work.

APM and infrastructure platforms have added model, token and agent views to existing tracing, which suits teams that want AI signals next to service health. LLM-specific tracing and evaluation platforms start from prompts, datasets and scoring, which suits teams iterating on prompts and agents. ML model monitoring tools come from tabular models and are strongest on drift and data quality. Open source instrumentation libraries and the OpenTelemetry Collector sit underneath any of these and keep your data portable.

Before you buy, check whether the tool accepts OpenTelemetry GenAI data, lets you redact content at collection time, states where and how long traces are stored, and can run evaluations on production samples. Teams that already run service-level objectives can extend them to AI endpoints; our SRE and observability consulting covers the SLOs, alerting and tracing those AI endpoints depend on.

How to Set Up AI Observability in Five Steps

A first rollout should cover one production AI feature end to end rather than every model at once. These five steps build the minimum that lets you explain one bad answer and one cost spike.

A top-to-bottom flow of four steps: instrument every call, set content capture, define quality checks, review traces routinely.
A first rollout instruments one feature, sets content rules and quality checks, then reviews traces as a routine.

1. Instrument every call

Add OpenTelemetry instrumentation to model calls, retrieval, tool calls and agent loops, and propagate trace context from the user request through every service. Record model name and version, prompt template version, token counts and errors on each span.

2. Decide what content you capture

Choose per environment whether prompts and responses are stored, sampled, redacted or excluded. Development can keep full content; production usually needs redaction of personal data and a shorter retention period.

3. Define quality checks

Write a fixed set of real test questions with expected properties, run it before each model, prompt or index change, and score a sample of production traffic with the same criteria so test and live quality can be compared.

4. Set baselines and alerts

Record normal ranges for latency, token use, refusal rate and evaluation scores, then alert on sustained deviation rather than single spikes. Route quality alerts to the team that owns the prompt or model, not only to on-call engineers.

5. Review traces as a routine

Hold a regular review of the worst-scored and most expensive traces. Turn each finding into a test question, guardrail, prompt change or ticket.

Prompt Logs as Personal Data and Compliance Evidence

Traces that prove what an AI system did also hold customer messages, documents and personal identifiers, so they need the same controls as the production systems they describe.

Treat trace stores as production data: restrict access by role, redact personal data at the collector before it leaves your network, set retention by purpose and log who reads traces. The OWASP GenAI Security Project describes AI observability as the forensic record for investigating prompt injection and agent incidents, which is an argument for keeping traces intact but protected, not for keeping everything forever.

Regulators already expect this record. Under the EU AI Act, high-risk systems must log activity so results can be traced, and providers must run post-market monitoring and report serious incidents. The European Commission's AI Act page, updated October 19, 2026, says those high-risk obligations apply from December 2, 2027 for systems in listed areas such as employment and education, and from August 2, 2028 for AI built into regulated products, after the AI Omnibus entered into force on July 27, 2026. In the United States, the voluntary NIST AI Risk Management Framework asks organizations to monitor the functionality and behavior of AI systems in production. Mapping traces, evaluations and incident records to these controls is governance work as much as engineering, and our AI governance services address how those records support oversight.

Mistakes That Make AI Observability Expensive or Blind

Most failed rollouts collect plenty of data and still cannot answer the question that matters. These are the patterns to avoid when you plan what to collect, keep and review.

Logging everything at full fidelity is the most common one. Full prompts and responses for every request are expensive to store, slow to search and risky to hold. Sample routine traffic, keep full traces for errors, flagged answers and evaluation samples, and drop content you will never review.

The second is watching only infrastructure. Green latency charts say nothing about answer quality, so a team with no evaluation scores still cannot tell good answers from bad. The third is broken traces: if trace context is not passed into retrieval services, tool backends or a second agent, the most important steps vanish from the record.

The fourth is unowned alerts. A drift alert with no named owner is ignored within weeks. The fifth is treating hosted models as fixed. Providers update and retire model versions, so record the exact version returned in each response and rerun your test set when it changes.

FAQs About AI Observability

These answers cover questions people often ask about AI observability that the sections above do not address directly, from naming and scope to hosted models, retention and ownership.

What is the difference between AI observability and LLM observability?

LLM observability focuses on model calls: prompts, responses, tokens and evaluations. AI observability is wider and also covers retrieval, agents, tools, classic ML models, policies and the infrastructure they run on.

Is AI observability part of MLOps?

It overlaps with MLOps but is not limited to it. MLOps covers training, deployment and model monitoring for teams that build models. AI observability also applies to teams that only call hosted models and build applications or agents on top of them.

Can you observe managed model APIs like OpenAI or Amazon Bedrock?

Yes, from the client side. You cannot see inside the provider's model, but you can trace every request and response, token counts, latency, errors and the model version returned, which covers the client side of most incidents and costs.

How long should AI traces be kept?

There is no single number. The length usually follows what a regulation or contract requires you to keep, how far back an incident investigation needs to look and how long evaluation samples stay useful for comparing releases. Redacting personal data before storage keeps longer retention from meaning more exposure.

Who should own AI observability in a company?

Ownership is usually shared. A platform or SRE team runs the pipeline and collectors, product or ML teams own quality checks and prompts, and security and compliance teams set content capture, access and retention rules.

Where AI Observability Is Heading and Where to Start

Two shifts shape the next year: a shared schema for agent telemetry that is still marked Development, and dated regulatory timelines that turn traces into records of how a system behaved.

Agents add steps, tools and hand-offs, and each one is another place for an answer to go wrong. The OpenTelemetry GenAI conventions give teams a common format, adopted through components you can update while they remain in Development.

Start with the five steps above on one feature, then extend the same pipeline to the next.

If you are planning AI observability for a production assistant or agent and want help with the instrumentation, evaluation and governance pieces, talk to the Cognativ team about your AI observability setup.

Never miss a post

Practical Cognativ articles on AI, software delivery, data, ecommerce, and RAPID transformation.

  • Free weekly tech news
  • Nearly 1,000 readers
  • Unsubscribe in one click
  • Never sold or shared

As featured inForbesUSA TodayCEOWorld Magazine