LLM Observability
LLM observability captures prompts, responses, tokens, tool calls, and eval scores so teams can manage quality, cost, and safety in production. Adopting OpenTelemetry GenAI conventions keeps telemetry portable and debuggable.
Best Practice: LLM Observability
LLM observability is the practice of capturing what an LLM application does in production so you can measure quality, cost, latency, and safety, and debug failures. It extends traditional observability with AI-specific signals: full prompt and response traces, token usage, tool calls, retrieval context, and evaluation scores. Because model behavior is non-deterministic and costs scale with tokens, you cannot manage an LLM system you cannot see. Observability turns vague complaints into concrete traces you can inspect and improve.
Traditional observability rests on logs, metrics, and traces. LLM observability keeps all three and adds AI-specific signals: the full prompt and response, the model and parameters used, token counts, retrieved context, tool calls, and evaluation scores. The OpenTelemetry project has published GenAI semantic conventions so this telemetry is portable across vendors rather than locked into one platform. With these signals in place, a vague report that 'the assistant gave a bad answer' becomes a concrete trace you can open, inspect, and turn into a new eval case.
Step-by-Step Implementation Guidance
- Instrument every LLM call to capture prompts, responses, model, and token counts.
- Trace multi-step flows end to end, including tool calls and retrieval.
- Track cost and latency per request, per feature, and per user.
- Sample production traffic and score it with automated evals.
- Capture user feedback signals such as thumbs up or down.
- Set alerts on cost spikes, latency, error rates, and safety triggers.
- Use OpenTelemetry GenAI semantic conventions for portable telemetry.
- Feed real failures back into your eval test sets.
Cost and quality must be watched together. Tracking token usage and latency per request, per feature, and per user reveals where spend concentrates and where users wait. Sampling production traffic and scoring it with automated evals surfaces quality regressions that offline tests miss. User feedback signals, such as a thumbs up or down, add a cheap human label. Alerts on cost spikes, error rates, latency, and safety triggers turn observability from a forensic tool into an early-warning system. Correlating LLM telemetry with the rest of your stack, such as database queries and downstream service calls, lets you see the full request rather than the model in isolation, which is essential for debugging real incidents.
Common Mistakes Teams Make When Ignoring This Practice
- Logging only errors and missing the full trace context.
- No token or cost tracking until the bill surprises everyone.
- Treating multi-step agents as black boxes.
- No production sampling or quality scoring after launch.
- Vendor-locked telemetry that cannot be correlated with other systems.
Tools and Techniques That Support This Practice
- Platforms: LangSmith, Langfuse, Arize Phoenix, Helicone, Datadog LLM Observability.
- Standards: OpenTelemetry GenAI semantic conventions.
- Techniques: trace sampling, online evals, cost dashboards, feedback capture.
How This Practice Applies to Different Migration Types
- Cloud Migration: Trace an AI ops assistant to confirm its recommendations and costs.
- Database Migration: Monitor token cost of large schema-analysis prompts.
- SaaS Migration: Watch latency and error rates of integration-generating calls.
- Codebase Migration: Inspect agent traces to debug failed code translations.
Checklist
- Every LLM call instrumented
- End-to-end multi-step traces captured
- Cost and latency tracked per feature
- Production traffic sampled and scored
- User feedback captured
- Alerts set on cost, latency, and safety
- OpenTelemetry GenAI conventions adopted