AI Systems

LLM Observability — Seeing What Happened in Production

Evals and agentic evals tell you what a system will likely do before it ships. Observability tells you what it actually did, for a specific user, on a specific request, right now. The two are complementary and easy to confuse: evals establish confidence before deployment, observability provides ground truth after it.

Quick reference
What it is
Structured tracing, cost/latency dashboards, and drift detection that let you reconstruct exactly what a live system did on a real request.
Mental model
A flight recorder, not a pre-flight checklist — evals are the checklist run before takeoff, observability is what you play back after something goes wrong mid-flight.
Key numbers
Track p50/p95/p99 latency, not just averages — averages hide the tail behavior that actually drives complaints.
Reach for it when
The system is live — this is not optional past a demo, and retrofitting it after an unreproducible incident is far more painful than building it in from day one.
A request's root span branches into retrieval, LLM call, tool call, and guardrail spans, all feeding into traces, then metrics, then drift and anomaly alerts Request Span Root Retrieval Span LLM Call Span Tool Call Span Guardrail Span Traces → Metrics (p50/p95/p99, cost/token) → Alerts on drift and anomalies
This is the OpenTelemetry model applied to an LLM pipeline — every span carries inputs, outputs, latency, and token counts, so a failure attributes to the exact step that caused it instead of an opaque black box.

Tracing and span-level logging

Every request is captured as a structured trace, following the OpenTelemetry model: a root span for the overall request, with child spans for each retrieval call, each LLM generation call, each tool invocation, and each guardrail check — all tagged with inputs, outputs, latency, and token counts. This lets a failure attribute to the exact step that caused it rather than treating the pipeline as an opaque black box. Purpose-built LLM tracing tools add LLM-aware concepts, like prompt and completion capture, on top of generic distributed tracing.

Token, cost, and latency monitoring

Dashboards tracking token usage, dollar cost, and latency percentiles (p50, p95, p99, since averages hide the tail behavior that actually drives complaints) broken down per route, per model, and per customer segment. This surfaces a specific, common production failure: a single prompt template or a single customer silently becoming disproportionately expensive, often because a chain grew an extra retry loop or a context window quietly ballooned. Rate limiting and budget alerts (per-minute caps, per-tenant spend ceilings) belong in this layer, guarding against a bug or an abusive user generating an unbounded bill.

Drift and anomaly detection

Monitoring output distributions, retrieval quality, and user feedback signals over time catches silent degradation that no single request would reveal. Examples: embedding model drift, where an upstream provider silently updates a model and the vector space shifts underneath a RAG pipeline; a knowledge base going stale as source documents age past a freshness threshold; or a gradual shift in the distribution of user queries that pushes traffic outside the distribution the system was ever evaluated against. Statistical approaches range from simple threshold alerts on rolling eval scores to population-level distribution comparisons between current and baseline traffic.

Productionizing this pattern

What changes past a demo

Real-world applications

Embedded applications

Gotchas

Field notes