LLM monitoring and observability

This post covers LLM monitoring for a production application: the traces, metrics, evaluations and alerts that show when answers get worse and why. It also covers the status of the OpenTelemetry GenAI conventions and the main open-source and commercial tools as of October 2026.

LLM trace waterfall with Request, Retrieval, LLM call, Tool call and Guardrail spans, beside Latency, Tokens, Cost and Errors charts

Monitoring shows that something changed, and observability gives you the data to find the cause. In an LLM application, uptime, latency and error rate can all look normal while the answers get worse.

This post does not cover where trace data is stored. Our guide Self-hosted LLM stack for data residency covers that, along with and keeping trace data in one region.

Why classic monitoring is not enough

A request to a web service succeeds or fails. A request to an LLM application can return HTTP 200 with a fluent, wrong answer, and no status code marks that failure.

One user request can also start a retrieval query, several model calls, tool calls and retries. A single latency graph for the endpoint hides which step was slow or wrong. The unit of observation is the trace: the tree of every step that produced one response.

LLM tracing

A trace for an LLM request is a tree of spans. The root span is the incoming request, and child spans cover retrieval, each model call, each tool call and post-processing. Record these fields on each model-call span:

  • the model you requested and the model the provider reports back
  • the provider or endpoint
  • the prompt template name and version, not only the rendered text
  • parameters such as temperature and maximum output tokens
  • input, output and cached token counts
  • time to first token and total duration for streamed responses
  • the finish reason, such as a normal stop, a length limit, a content filter or a tool call
  • errors and retries

OpenTelemetry GenAI semantic conventions

OpenTelemetry defines standard names for these fields in its GenAI semantic conventions. Instrumentation that uses these names works with any backend that reads them, so you can change backends without changing your code.

The conventions moved to a new repository in 2026. Semantic conventions v1.42.0 (June 2026) deprecated the gen_ai.* definitions in the main repository, and they now live in a dedicated repository, semantic-conventions-genai. As of October 2026 that repository has no tagged release, and every GenAI attribute still has Development status, so expect names to change.

The main span attributes for a model call are:

AttributeWhat it holds
gen_ai.operation.nameThe operation, such as chat or embeddings. This attribute is required.
gen_ai.provider.nameThe provider. It replaced gen_ai.system in v1.37.0.
gen_ai.request.model, gen_ai.response.modelThe model you asked for and the model that answered
gen_ai.request.temperature, gen_ai.request.max_tokensRequest parameters
gen_ai.usage.input_tokens, gen_ai.usage.output_tokensToken counts. The input count includes cached tokens.
gen_ai.usage.cache_read.input_tokensInput tokens served from the provider's prompt cache
gen_ai.response.finish_reasonsWhy the model stopped
gen_ai.conversation.idThe conversation or session the call belongs to

The span name follows the pattern {gen_ai.operation.name} {gen_ai.request.model}, for example "chat gpt-5" for a chat call to the model gpt-5. Agent frameworks add invoke_agent spans for an agent run and execute_tool spans for each tool call.

The metric names are also changing. The current gen_ai.client.token.usage metric counts all token types together, and unreleased changes in the new repository split that metric into separate metrics for input, output and cached tokens. Server-side metrics such as gen_ai.server.time_to_first_token keep their names. Check the current docs before you build dashboards on metric names.

Some instrumentation libraries still emit the names used before v1.37 by default. Setting the environment variable OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental switches them to the latest experimental names.

Decide whether to capture prompt text

Full prompts and completions are the most useful debugging data and the riskiest data, because they often contain personal or confidential information. The OpenTelemetry spec treats the content attributes, gen_ai.input.messages and gen_ai.output.messages, as opt-in, so instrumentations should not capture them by default.

Choose a policy per environment: you can store the full content, redact it before storage, or store only identifiers and hashes. Two of our guides cover the privacy side: PII redaction for LLM prompts and traces and Access and deletion requests against LLM logs and vector stores.

The metrics that matter

CategoryMetricsProblems these metrics reveal
ReliabilityError rate and timeouts by model and endpoint, retry rate, rate-limit responsesProvider incidents and quota limits
LatencyEnd-to-end time, time to first token, per-step p50, p95 and p99The slowest requests and the step that makes them slow
CostInput, output and cached tokens per request, cost per request, cost by feature, tenant and modelCost increases after a prompt change or a traffic shift
Output qualityEvaluator scores, user feedback rate, refusal and fallback ratesFluent but wrong answers
SafetyGuardrail trigger rate, blocked inputs and outputsAbuse attempts and gaps in filtering
Retrieval (RAG)Chunks retrieved, score distribution, empty-result rate, share of answers that cite a sourceRetrieval misses, which cause many RAG failures
AgentsSteps per task, tool error rate, step-limit hits, task completion rateAgents that repeat steps or take unneeded steps without raising an error

Split every metric by prompt version, model version, tenant and feature, because an overall average can stay flat while one workflow breaks.

Prompt caching changes cost and latency. OpenAI reports cached tokens in usage.input_tokens_details.cached_tokens on the Responses API. Anthropic reports cache_read_input_tokens and cache_creation_input_tokens in its usage object. A provider reuses the cache only when the start of a new prompt is identical to a cached prompt. Track the cache hit rate, because an edit near the start of the template can drop the rate to zero.

Measuring quality without ground truth

Labels are scarce for LLM output, and "good" is often subjective. Four methods work together:

  1. Programmatic checks. These are cheap and deterministic: check that the output parses as the required JSON, stays within length limits and avoids forbidden phrases. In a RAG application, check that every source the answer cites was among the retrieved documents. Run these checks on every response.
  2. Model-graded evaluation. A second model scores the answer against a rubric, such as relevance, faithfulness to the retrieved context, or tone. Judges have known biases, and the MT-Bench paper found three: judges favor the answer shown first, favor longer answers, and favor answers written by their own model. Calibrate the judge against human labels on a sample, and recalibrate when you change the judge model.
  3. User signals. Thumbs up or down, edits to a draft, copy actions, handoffs to a human, and repeated rephrasing of one question. These signals are noisy and cost nothing to collect.
  4. Human review of samples. Sample production traces, weighted toward low evaluator scores and negative feedback, and have people label them. These labeled examples become your evaluation set, a fixed list of test inputs with expected behavior.

For RAG, Ragas (Apache 2.0) defines metrics such as faithfulness, response relevancy, context precision and context recall.

Turn production failures into test cases

When someone finds a bad trace, add its input and the expected behavior to a versioned evaluation set. Run the set in CI on every change to a prompt, model, retrieval setting or tool definition.

The same set makes model upgrades safer, because providers retire model versions on published schedules. Anthropic's deprecation page promises at least 60 days' notice, and OpenAI lists shutdown dates on its deprecations page. Run the candidate model on the evaluation set before the old version shuts down, and compare the results case by case.

Release a prompt change or a new model version with the same patterns used for ML models, such as shadow, canary and A/B tests. Our post Model deployment strategies describes each pattern.

Evaluating retrieval separately

In a retrieval-augmented application, evaluate retrieval apart from generation. For a sample of queries, check whether the passages needed for the answer were in the retrieved set. If they were missing, no prompt change fixes the answer.

Watch three retrieval signals:

  • stale documents, which changed at the source but were not embedded again
  • queries with unusually low similarity scores
  • queries that return nothing

For corpora with charts, scans and slides, see our post Multimodal RAG.

LLM observability tools in October 2026

The table below compares the main tools by license, self-hosting and OpenTelemetry support, where OTLP is the OpenTelemetry protocol for sending traces to a backend. "Not confirmed" means we did not find OpenTelemetry ingest in the tool's docs.

ToolLicenseSelf-hostOpenTelemetryNotes
LangfuseMIT, except the paid enterprise featuresYesOTLP endpoint that reads gen_ai.* attributes into its own trace modelAcquired by ClickHouse in January 2026. License and self-hosting unchanged.
Arize PhoenixElastic License 2.0YesAccepts OTLP. Its own instrumentation uses a separate naming scheme called OpenInference.Arize also sells a hosted version, Arize AX.
MLflow TracingApache 2.0YesIngests and exports traces in the GenAI convention formatFits teams that already run MLflow for models.
Opik (Comet)Apache 2.0YesOTLP over HTTPIncludes evaluation and datasets.
OpenLITApache 2.0YesEmits GenAI convention namesInstrumentation and a UI.
OpenLLMetryApache 2.0Library onlyBuilt on OpenTelemetryTraceloop, the company behind OpenLLMetry, became part of ServiceNow in March 2026.
HeliconeApache 2.0YesProxy in the request pathBecame part of Mintlify in March 2026 and is in maintenance mode.
LangSmithProprietaryEnterprise plan add-onNot confirmedMade by the LangChain team.
Datadog LLM ObservabilityCommercialNoIngests GenAI conventions v1.37 and later without a Datadog SDKNeeds an OTLP header that routes traces to LLM Observability.
EvidentlyApache 2.0YesNot confirmedEvaluations and drift checks for data and LLM outputs.

Instrument with OpenTelemetry where the tool allows it.

Alerts

LLM metrics are noisy, so split alerts into levels:

  • Send an urgent alert to the on-call engineer on hard failures: error rate, timeouts, provider outages, cost per hour above a ceiling, and a spike in guardrail blocks.
  • Open a ticket on slow change: evaluator scores falling over days, rising fallback rates, a growing retrieval-miss rate.
  • Annotate each prompt release, model change and deployment on dashboards. Tag every trace with the prompt version, model version and deployment ID, so a change in a metric can be tied to the release that caused it.
  • Set cost limits before launch. An agent that repeats the same step, or a prompt that suddenly includes a whole document, can multiply token use within minutes. Hard per-request token limits and per-tenant budgets cap that spend. The OWASP Top 10 for LLM Applications calls uncontrolled token use "unbounded consumption".

A starting setup

  1. Instrument every model, retrieval and tool call with spans that use the OpenTelemetry GenAI names, and tag each span with prompt and model versions.
  2. Decide the content-capture policy, then export traces to a backend you control or trust.
  3. Build dashboards for latency, error rate and token cost by feature and version.
  4. Run programmatic checks on every response and a judge-based evaluator on a sample.
  5. Collect at least one user feedback signal.
  6. Build the evaluation set from real failures and run it in CI.

FAQ

What is LLM observability, and how does it differ from monitoring?

Monitoring tracks known metrics, such as error rate, latency and cost, and alerts when they cross a threshold. Observability keeps the detailed traces, prompts and evaluation scores that let you find the cause of a problem nobody predicted.

Are the OpenTelemetry GenAI conventions stable?

No. As of October 2026 every GenAI attribute has Development status, and the conventions moved to a new repository that has no tagged release yet. Pin the instrumentation version you use, and check the changelog before an upgrade.

Should traces include full prompts and responses?

It depends on the environment, and the OpenTelemetry spec makes content capture opt-in. Many teams keep full content in development, redact it in production, and keep a short retention period for anything stored.

How many production traces should be scored by an LLM judge?

There is no standard percentage. Teams usually score a random sample plus every trace with negative feedback, and choose the sample size based on the judge's cost per call.

Do I need a proxy or gateway for observability?

No. SDK or OpenTelemetry instrumentation sends traces from your code without a new hop in the request path. A gateway adds central features such as rate limits, provider fallback and caching, and it also becomes a component that can fail.

Need this built?

Our post What is MLOps? applies the same versioning and evaluation practices to classical models. If you need these records for an AI governance program, “ISO/IEC 42001 vs NIST AI RMF” shows which clauses and controls they serve. We build and run tracing and evaluation pipelines in our LLMOps and NLP and LLM applications services. To plan a tracing and evaluation setup for your application, request a quote or email [email protected].

Privacy engineering notes by email

When we publish a new guide on data mapping, DSR automation or AI privacy, we send it to this list. Nothing else.