Traditional monitoring tells you a request was slow. LLM observability has to tell you *why* an answer was slow, expensive, or simply wrong. Here’s a checklist I’d use for any LLM feature going to production.
Log these fields for every model call
- Model and version (and provider).
- Input tokens and output tokens.
- Latency: time-to-first-token and total duration.
- Cost, calculated at write time so dashboards don’t need price tables.
- Outcome: success, error type, timeout, filtered by guardrail.
- Tenant or user ID, for budgets and abuse detection.
- Prompt template name and version: not necessarily the raw prompt.
Decide early what you will and won’t store from prompts and outputs. Raw text is useful for debugging and risky for privacy; sampling plus redaction is a common middle ground.
Trace the whole chain, not just the model
A single user question in a RAG or agent system can fan out into many steps: embed the query, search the index, re-rank, call the model, call a tool, call the model again. Give each step a span inside one trace, so you can see which step ate the latency budget.
OpenTelemetry has semantic conventions for generative AI (attributes under gen_ai.*, such as the request model and token usage), which lets you use the same tracing stack you already run for everything else.
Metrics worth a dashboard
- Requests per minute, error rate and timeout rate per model.
- p50 / p95 time-to-first-token and total latency.
- Tokens per minute and cost per hour, by feature and by tenant.
- Cache hit rate (if you cache).
- Guardrail blocks and output-validation failures.
- For self-hosted inference: GPU utilisation, GPU memory and queue depth. Inference servers such as vLLM expose Prometheus metrics for this.
Alerts that catch real problems
- Cost anomalies: spend per hour far above the usual baseline.
- Latency SLO burn: time-to-first-token p95 over target for a sustained window.
- Error spikes per provider, so you can switch to a fallback quickly.
- Eval regression: a scheduled eval run whose pass rate drops after a change.
Quality is the tricky one: it rarely shows up as an error. Scheduled evals and user feedback signals (thumbs down, retries, abandoned sessions) are your early warning.
Putting it together
Observability is what lets the system in Serving an LLM API in Production survive real traffic, and it’s the foundation that makes AI agents for incident response possible at all: an agent can only diagnose what you’ve recorded. If you’re mapping this to job roles, it sits right in the overlap I described in LLMOps vs MLOps vs SRE.
FAQ
Do I need a special LLM observability tool?
Not necessarily. Many teams start with their existing logging, metrics and tracing stack plus a few LLM-specific fields. Dedicated tools add prompt playback and eval workflows.
Should I log full prompts and responses?
Only with a clear retention and redaction policy. Many teams log metadata always and full text for a sampled, access-controlled subset.
What’s the single most useful LLM metric?
Cost per successful request, broken down by feature. It connects engineering choices directly to the business.