OPERATIONS LAYER · OBSERVABILITY

Large Language Model Observability: Traces, Evaluation and Drift

Connect infrastructure signals, request traces, token usage, model quality and user outcomes so failures can be diagnosed rather than guessed.

Cluster
LLMOps
Owner Course
LLMOps Course
Updated
2026-09-01T05:30:00+05:30
Type
Core Guide
Direct Answer

Large language model observability connects infrastructure signals (latency, errors, GPU utilisation), request traces (the path from gateway through model to response), quality metrics (output quality scores, safety results) and user feedback. It differs from traditional monitoring because LLM outputs are non-deterministic—quality must be measured, not just availability. Drift detection tracks changes in input distribution, output quality and cost. SLOs should cover latency, quality and cost dimensions.

Observability signal types

System Metrics
Latency, throughput, error rates, GPU utilisation, memory, queue depth.
Infrastructure layer
Token Metrics
Input/output token counts, token cost, tokens per request, cache hit rate.
Cost layer
Quality Metrics
Output quality scores, safety results, format adherence, task success rate.
Quality layer
Traces
End-to-end request path: gateway → model → retrieval → response, with timing.
Request path
User Feedback
Thumbs up/down, corrections, explicit complaints or satisfaction signals.
Outcome layer
Drift Signals
Changes in input distribution, output quality, cost per request or safety rate.
Change detection

What Should Large Language Model Systems Measure?

Traditional software observability measures infrastructure: is the service up? What is the latency? What is the error rate? These are necessary but insufficient for LLM systems. An LLM service can return 200 OK with a perfectly formatted response that is factually wrong, unsafe or unhelpful. Observability for LLMs must measure quality, not just availability.

The measurement stack has four layers. System metrics measure infrastructure health (latency, throughput, errors, GPU memory). Token metrics measure cost (input/output tokens, cost per request, cache hit rate). Quality metrics measure output quality (task success rate, safety pass rate, format adherence). User feedback measures perceived quality (thumbs up/down, corrections, complaints).

Each layer has different collection cadence and cost. System metrics are cheap and continuous. Token metrics are cheap and per-request. Quality metrics are expensive—evaluating output quality requires automated evaluators or human review. User feedback is sparse and biased but directly measures what users care about.

How Do Traces Explain a Large Language Model Request?

A trace is the end-to-end record of a single request's journey through the system. For a RAG system, a trace includes: the user's input prompt, the gateway's routing decision, the retrieval step (query embedding, vector search, retrieved documents), the prompt construction (system prompt + retrieved context + user input), the model's call (model version, parameters, token count), and the response returned to the user.

Each span in the trace has a start time, end time and metadata. The trace waterfall visualises the temporal relationship between spans—showing which steps were sequential and which were parallel, and where time was spent. OpenTelemetry is the open standard for distributed tracing and is supported by vLLM, LangSmith and other LLM observability tools.

Traces are essential for debugging. When a user reports a bad response, the trace shows exactly what happened: was the retrieval poor? Was the prompt construction wrong? Was the model call slow? Without traces, debugging is guesswork—engineers must reproduce the issue blindly. With traces, the exact failure point is visible.

How Are System Metrics Different From Quality Metrics?

The fundamental difference between infrastructure and quality observability for LLMs.

DimensionSystem MetricsQuality Metrics
What they measureInfrastructure health (latency, errors, memory)Output correctness, safety, helpfulness
Collection costLow—automatic from instrumentationHigh—requires evaluators or human review
Collection cadenceEvery requestSampled (e.g. 1–10% of requests)
Failure detectionImmediate—error rate spikesDelayed—quality degradation accumulates over time
DeterminismDeterministic—same request, same latencyNon-deterministic—same request, different quality
Alerting thresholdClear (error rate > X%)Fuzzy (quality score trending down)
Required toolsStandard monitoring (Prometheus, Grafana)LLM-specific evaluators, LLM-as-judge, human review

How Can Model Quality Be Evaluated in Production?

Production quality evaluation is the practice of measuring output quality on live traffic, not just in offline benchmarks. The challenge is that quality evaluation is expensive—running an LLM-as-judge on every request doubles the cost, and human review is slower than traffic volume. Sampling is the practical approach.

A typical production evaluation pipeline samples 1–10% of production traffic, runs an automated evaluator (LLM-as-judge or rule-based checks) on the sampled outputs, and aggregates quality scores over time windows. If the quality score drops below a threshold, an alert fires. The evaluator must be validated against human review to ensure it correlates with real quality.

Safety evaluation in production is higher-stakes. Safety checks should run on a higher sample rate (or all requests for high-risk applications) and use a combination of automated classifiers and human review for edge cases. Safety failures must trigger immediate alerts, not just trend monitoring.

What Does Drift Mean in a Large Language Model System?

Drift in an LLM system refers to any statistically significant change in the distribution of inputs, outputs or costs over time. Unlike traditional ML drift (which tracks feature distribution and prediction distribution), LLM drift has additional dimensions: input prompt distribution, output quality distribution, output length distribution, cost per request and safety failure rate.

Input drift occurs when users start asking different types of questions—for example, a system designed for English queries starts receiving multilingual input. This can degrade quality if the model was not evaluated on the new input distribution. Output quality drift occurs when the quality score trends down over time—this can happen even without model changes if the input distribution shifts toward harder queries.

Cost drift occurs when the average cost per request increases—this can happen if input prompts get longer, if output lengths increase, or if a caching layer becomes less effective. Drift detection requires establishing baselines and monitoring for statistically significant deviations. The alerting threshold must account for natural variance—too sensitive creates false positives, too insensitive misses real regressions.

Which SLOs and Alerts Should an LLMOps Team Define?

SLO dimensions and alerting strategies for production LLM systems.

DecisionOptionsTrade-offRecommendation
Latency SLOTTFT < X ms, inter-token latency < Y msStricter SLO = more capacity neededSet TTFT and ITL separately; alert on P95 and P99
Quality SLOQuality score > X% on sampled trafficHigher threshold = more alerts; lower = riskStart conservative; tighten as evaluator confidence grows
Safety SLOSafety failure rate < X per 1000 requestsZero is ideal but may be unachievableAlert on any safety failure; investigate each one
Cost SLOCost per request < X, daily budget < YBudget limits may reject requestsSet hard daily budget; alert at 80% utilisation
Error SLOError rate < X%, timeout rate < Y%Stricter = better UX, more capacity neededStandard 99.9% availability; separate timeout SLO
Alert sensitivitySensitive (more false positives) vs conservative (miss regressions)Alert fatigue vs missed incidentsUse multi-window alerts (5m + 1h) to reduce false positives

Observability console components

Inputs
  • Request ID / trace ID
  • Model and prompt version
  • User input
  • System state (GPU, queue)
Process
  • Assemble trace waterfall from distributed spans
  • Correlate with system metrics (latency, memory, GPU)
  • Run quality evaluator on output (if sampled)
  • Check safety classifier result
  • Record user feedback if available
  • Calculate cost from token usage
Outputs
  • Complete request timeline
  • Quality score
  • Safety result
  • Cost estimate
  • Drift signal contribution

Key takeaways

  • LLM observability must measure quality, not just availability—a 200 OK can still be a bad response.
  • Four measurement layers: system metrics, token metrics, quality metrics, user feedback.
  • Traces connect a bad output to the exact model, prompt, retrieval path and release that produced it.
  • Quality evaluation in production uses sampling—1–10% of traffic evaluated by automated evaluators.
  • Drift in LLMs has more dimensions than traditional ML: input, output quality, cost, safety.
  • SLOs should cover latency, quality, safety and cost—each with its own alerting threshold.

OpenTelemetry is the open standard for distributed tracing and is verified against official OTel documentation. LLM-specific observability patterns are synthesised from LangSmith documentation and industry practice.

  • Quality evaluation methodologies (LLM-as-judge, human review protocols) are evolving.
  • Specific alert thresholds depend on application requirements and risk tolerance.

Review cadence: Reviewed every 90 days. Next review by December 2026.

MOVE FROM A WORKING MODEL TO AN OPERABLE SYSTEM

Collecting logs is not observability. The system becomes observable when engineers can connect a weak answer to the exact model, prompt, retrieval path, trace and release.

In the LLMOps Course, you build the operational layer around large language model, retrieval and agent systems—from inference serving and evaluation gates to observability, release control, security, scaling and cost management.

Inference gatewayEvaluation pipelineRelease controlTrace dashboardReliability evidence

Twelve-week live program for engineers building and operating production AI systems.

Sources and technical review
Last reviewed: 2026-09-01
Technical review: scai-llmops-engineering