Skip to main content

Thread Transfer

AI observability in 2025: Monitoring production LLMs at scale

You can't improve what you can't measure. Here's how top teams monitor latency, cost, and quality in production LLMs.

Jorgo Bardho

Founder, Thread Transfer

April 1, 202512 min read
LLM observabilityAI monitoringLangfuseArize
LLM observability dashboard

You can't improve what you can't measure. Production LLMs fail in subtle ways: degraded response quality, context drift, hallucinations that slip through testing. Traditional APM tools capture latency and error rates but miss semantic failures. LLM observability platforms fill that gap by tracking prompt quality, model performance, and cost efficiency in real time.

Why observability matters for LLMs

Unlike deterministic software, LLMs produce different outputs for the same input. A prompt that worked yesterday might fail today if the model updates or context shifts. Teams need visibility into prompt success rates, token usage patterns, and output quality metrics. Observability enables debugging ("why did this prompt fail?"), optimization ("which model version performs best?"), and cost control ("where are we overspending on tokens?").

Key metrics to track

Effective LLM observability measures five dimensions:

  • Latency—Time from request to first token (TTFT) and total response time. P50, P95, and P99 latencies reveal tail behavior.
  • Cost—Tokens consumed per request, cost per user session, and daily/monthly spend. Break down by model (GPT-4 vs GPT-3.5) and feature.
  • Quality—Semantic similarity to reference outputs, hallucination rate, refusal rate, and user feedback (thumbs up/down).
  • Reliability—Error rates, retry counts, rate limit hits, and timeout failures.
  • Context efficiency—How much of the input context the model actually uses. Are you sending 8k tokens when 2k would suffice?

Tool comparison: Datadog, Langfuse, Arize

Datadog LLM Observability integrates with existing Datadog APM. It auto-instruments OpenAI, Anthropic, and LangChain calls, capturing traces, token counts, and costs. Dashboards show latency and error rates alongside traditional metrics. Best for teams already using Datadog who want unified monitoring.

Langfuse focuses on open-source flexibility. It traces entire LLM workflows (retrieval, multiple model calls, tool use) and associates user feedback with specific prompts. Langfuse supports prompt versioning, A/B testing, and dataset curation from production traffic. Ideal for teams building custom agents or RAG systems who need deep tracing and experimentation.

Arize AI specializes in model performance monitoring. It detects drift, data quality issues, and fairness violations. Arize compares embeddings over time to catch subtle degradation in retrieval or classification accuracy. Best for ML teams monitoring multiple models across the stack, not just LLMs.

Implementation patterns

Start by instrumenting your LLM client library. Most observability platforms provide SDKs or OpenTelemetry integrations. For OpenAI, wrap the client in a tracing decorator that logs each request and response. For LangChain, enable callbacks that send data to your observability backend.

Tag traces with metadata: user ID, session ID, feature name, and model version. This enables slicing metrics by cohort ("how do enterprise users' costs compare to free tier?") or feature ("is the summarization endpoint driving most errors?").

Collect user feedback inline. After the LLM responds, prompt users to rate the answer. Correlate feedback with trace IDs so you can replay bad interactions and debug them.

Alerting strategies

Set up alerts for anomalies, not absolute thresholds. A 10% spike in token usage might signal a bug (infinite loops) or a legitimate traffic surge. Use anomaly detection to alert when metrics deviate significantly from baseline.

Monitor quality proxies. If refusal rate suddenly increases ("I can't answer that"), the model might be misinterpreting updated system prompts. If latency P95 doubles, upstream API changes or rate limits might be to blame.

Alert on cost breaches. Set daily and weekly budgets for each model. If GPT-4 spend exceeds $500/day, trigger an alert and investigate whether traffic is legitimate or an accidental batch job.

Debugging workflows

When a user reports a bad response, search for the trace by session ID or timestamp. Replay the exact prompt, context, and model parameters. Compare the bad output to recent successful outputs with similar inputs—did the context change, or did the model version update?

For RAG failures, inspect retrieved documents. Did the model hallucinate because retrieval returned irrelevant chunks? Adjust chunking strategy or embedding models and re-run the query.

For agentic workflows, visualize the decision tree. Tools like Langfuse show each tool call, intermediate outputs, and final answer. Trace where the agent went off-track.

Cost optimization insights

Observability reveals waste. One team discovered 40% of requests hit GPT-4 unnecessarily—they routed simple FAQs to GPT-3.5 and cut costs by $18k/month. Another found 20% of tokens in prompts were repeated boilerplate; they cached the prefix and saved 90% on those tokens.

Use dashboards to identify high-cost outliers. A single user generating 100k tokens/day might indicate abuse or a bot. A feature with 2x higher token usage than expected might need prompt refactoring.

Choosing an observability platform? We've evaluated all three with production workloads. Email info@thread-transfer.com for decision frameworks and setup guides.