If you have been running production web services for any length of time, your monitoring playbook is well-honed: CPU and memory utilization, request rate and error rate, p99 latency, database query performance. You probably have dashboards in Grafana, alerts in PagerDuty, and a runbook for every failure mode you have encountered. Your on-call rotation is manageable because the failure modes are predictable.
Now imagine adding an LLM to that stack. Your API gateway still handles the same request volume. Your containers still consume the same memory. But between the HTTP request arriving and the response returning, your application is now calling an AI model that generates non-deterministic output, consumes variable token counts, and can fail in ways that produce confident wrong answers rather than error codes. The traditional APM stack tells you that your service is healthy. It has no idea whether the AI inside it is working correctly.
This is the monitoring gap that every engineering team hits when they move AI from proof-of-concept to production. The good news: you are not starting from scratch. Your existing APM infrastructure forms a solid foundation. What you need is to understand what traditional APM gets right, what it misses, and how to extend it for the unique failure modes of AI systems.
What Traditional APM Gets Right
Before diving into the differences, it is worth being clear about what conventional application performance monitoring handles well in an AI-enhanced stack.
Infrastructure layer visibility is unchanged. The hardware your AI inference runs on is still hardware. GPU utilization, VRAM consumption, CUDA memory allocation, network throughput to your model registry - these are all measured the same way as CPU and memory for traditional services. If you are self-hosting models with vLLM or TensorRT-LLM, your Prometheus node_exporter metrics give you the same operational visibility you had before.
Request routing and API gateway patterns are unchanged. Your load balancer still distributes traffic. Your rate limiter still enforces quotas. Your authentication middleware still validates tokens. These components are exactly the same whether the backend is a Python microservice or a Python microservice that calls an LLM.
Distributed tracing infrastructure is transferable. OpenTelemetry instrumentation that you already use for your application traces can extend to cover LLM calls. The trace context propagation, span hierarchy, and sampling strategies you have configured carry over. What changes is what you need to capture inside each span.
What Traditional APM Gets Wrong for AI Systems
The gap between conventional APM and AI-aware monitoring comes down to four fundamental differences in how AI applications behave compared to traditional software.
1. Non-Deterministic Output Cannot Be Reduced to Error Codes
A traditional web service fails loudly. The database connection times out. The service returns a 503. Your APM error rate spikes, your alert fires, and your on-call engineer knows within seconds that something is broken. The signal is binary and the error is immediately visible.
An LLM fails silently. The model returns a response that looks correct but contains factual errors. It generates code that compiles but implements the wrong algorithm. It answers a medical question with high confidence but wrong information. The HTTP response is a 200. Your APM shows zero errors. Your service is returning garbage and your dashboard has no idea.
This is the defining monitoring challenge for AI systems. You need to measure output quality, not just API success rates. That means ground-truth evaluation data, semantic similarity scoring against reference answers, structured output validation, and behavioral anomaly detection. None of these exist in traditional APM tools.
2. Cost Is Tied to Token Count, Not Request Count
Traditional API monitoring treats each request as roughly equivalent. Whether the client asks for one record or one hundred, whether the response contains a few bytes or several kilobytes, the infrastructure cost is relatively predictable per request. Your per-request APM metrics are meaningful.
LLM API pricing is linear with token consumption - input tokens plus output tokens. A single request with a 4,000-token context window and a 2,000-token completion costs roughly 6x more than a request with a 500-token context and 200-token completion. Your request rate dashboard tells you nothing about your actual spend. You need token-level granularity: input tokens per request, output tokens per request, estimated cost per request, cost per user session, and cost per feature.
For self-hosted inference, the cost dimension is still present but expressed differently. GPU memory consumption scales with context window size. Throughput (tokens per second per GPU) varies with batch size, model size, and quantization level. Monitoring your inference engine's token processing rate and correlating it with GPU utilization gives you the cost visibility you need for capacity planning and FinOps.
For a deeper treatment of AI cost monitoring, see our LLM FinOps guide which covers token tracking, semantic caching, and model routing strategies for cost reduction.
3. Latency Has Multiple Independent Components
In a traditional web service, request latency is a single number. You measure end-to-end duration from the client's perspective. If that number exceeds your SLO, you know something is slow and you look at your flame graph to find the bottleneck.
LLM latency is architecturally three separate measurements. Time to First Token (TTFT) measures the delay from when your request arrives at the model to when the first generated token leaves the inference engine. Time Per Output Token (TPOT) measures the average interval between successive generated tokens during generation. Total End-to-End Latency is the sum of both plus any pre- and post-processing in your application layer.
Each component points to a different failure mode. A TTFT spike tells you the model is slow to start generation - likely a GPU compute issue, a prompt prefill bottleneck, or a model loading problem. A climbing TPOT tells you token generation itself is slowing - possibly KV cache pressure, batch scheduling inefficiency, or hardware degradation. Your traditional APM latency histogram cannot distinguish these because they are hidden inside a single request duration.
Our LLM latency monitoring guide covers TTFT, TPOT, and the Grafana dashboard patterns that surface each bottleneck separately.
4. Context Window State Creates Unique Failure Modes
Traditional web services are stateless. Each request is independent. Your monitoring aggregates across requests because each one reveals the same information about system health.
LLM applications are stateful by design. The context window carries forward conversation history, retrieved documents, and system instructions from prior turns in the conversation. This means three things your traditional APM does not account for:
Context window exhaustion. As conversation history grows, your available context window shrinks. Eventually the model can no longer accept new input because the context is full. This failure mode - where new requests start failing silently or producing degraded output - is invisible to a monitoring system that only tracks request counts.
Retrieval-augmented context pollution. In a RAG pipeline, the context window is filled with documents retrieved from an external store. If your retrieval system returns irrelevant or low-quality documents, the model receives noisy context and produces worse output. This is a retrieval failure that manifests as a model quality failure, and your traditional APM has no signal for it.
Prompt sensitivity and context-dependent behavior. The same model can produce different quality outputs for semantically similar prompts depending on how the context window is populated. A prompt that works well at the start of a conversation may produce degraded output after 20 conversation turns have filled the context. Your monitoring needs to track quality over conversation depth, not just per-request.
For more on monitoring RAG pipelines specifically, see our RAG observability guide which covers the four-layer monitoring stack for retrieval quality.
The Monitoring Stack You Need for AI
Building AI-aware monitoring on top of your existing APM foundation means extending three layers: what you instrument at the data plane, what you store, and how you visualize and alert.
Instrument the Data Plane with AI-Specific Signals
Your OpenTelemetry spans need to capture AI-specific attributes alongside your existing HTTP and database spans. Every LLM call span should record input token count, output token count, model name, model version, temperature, truncation events, and time-to-first-token and time-per-output-token breakdowns where available.
If you are using a commercial LLM observability platform, tools like Helicone or Portkey.ai handle this instrumentation automatically via API proxying. For open source, the OpenLLM Telemetry framework and the OTel Python SDK's instrumented LLM clients give you the same signal granularity.
For hallucination detection and output quality monitoring, you need a separate instrumentation path that evaluates model outputs against reference signals. This typically runs asynchronously - not in the critical path of your inference request - and emits metrics to your time-series store when quality regressions are detected.
Extend Your Time-Series Store for Token and Quality Metrics
Prometheus is well-suited for the infrastructure metrics side of AI monitoring. GPU utilization, memory consumption, inference throughput - these are counters and gauges that map naturally to Prometheus data models. Extend your Prometheus metrics to include:
- llm_tokens_input_total - cumulative input token count by model and endpoint
- llm_tokens_output_total - cumulative output token count by model and endpoint
- llm_request_duration_seconds - histogram of total request duration broken down by TTFT/TPOT components
- llm_context_window_utilization - gauge of how full context windows are on average
- llm_quality_score - gauge of output quality from evaluation runs
- llm_hallucination_rate - rate of detected hallucinations per evaluation window
For teams using commercial platforms, these metrics are often provided out of the box. For teams running open source inference stacks, you will need to emit these metrics from your inference engine instrumentation.
Redesign Your Dashboards for AI Workloads
Your existing Grafana dashboard showing request rate, error rate, and latency is necessary but not sufficient for AI monitoring. Add these views:
Token economics dashboard. Total input and output tokens per hour/day/month, broken down by model, user, and feature. Estimated cost over time. This is your FinOps view for AI spend.
TTFT / TPOT breakdown. Separate histograms for time-to-first-token and time-per-output-token, not just combined request duration. Correlate these with GPU utilization and batch size to identify bottlenecks.
Output quality trends. A time-series view of your quality evaluation scores, hallucination rates, and structured output validation pass rates. This is your AI reliability signal - it tells you whether the model is generating correct output, not just whether the API is responding.
Context utilization view. For conversational AI applications, track the average context window utilization over conversation length. Watch for the context exhaustion pattern where quality degrades as conversations grow.
For a complete tutorial on building this monitoring stack with open source tools, see our open source LLM monitoring stack guide which covers Prometheus, Grafana, Loki, and OpenTelemetry for AI workloads.
Sentry's AI Monitoring (ixl) tracks your LLM application performance end-to-end — from prompt submission through model inference to response quality. See exactly where latency is coming from, which inputs trigger errors, and when model behavior changes across versions.
Alerting Strategies for AI Systems
Your traditional alert rules - error rate exceeds 1%, p99 latency exceeds 500ms - translate directly to AI systems at the infrastructure level. But they miss the alerts you actually need.
Add quality regression alerts. If your evaluation framework detects that hallucination rate has increased by more than 10% over a 24-hour window, fire an alert. This is not a traditional APM signal - it requires active evaluation running on production outputs.
Add token burn rate alerts. If your token consumption rate exceeds your budgeted threshold for the hour, alert before you hit a rate limit or run up unexpected costs. Set burn rate alerts at 80% of your hourly budget.
Add context utilization alerts. For RAG applications, if your average context utilization exceeds 85%, that is a signal that context window exhaustion is approaching and you may need to implement conversation summarization or window management.
Add retrieval quality alerts. Track your retrieval precision and recall metrics from your RAG pipeline. If retrieved document relevance drops below your quality threshold, alert before that degradation propagates to model output quality.
What Stays the Same
It is worth emphasizing that AI monitoring is not a wholesale replacement of your APM practice - it is an extension. Your Kubernetes pod monitoring, container health checks, network latency probes, and database query performance tracking all remain exactly as they were. The AI-specific additions layer on top of your existing infrastructure.
The teams that successfully transition to AI-aware monitoring are the ones that start with their existing APM foundation and add AI-specific signals incrementally. You do not need to rip out your Prometheus/Grafana stack and start over. You need to extend it with token metrics, quality signals, and latency breakdowns that give you visibility into the unique failure modes of AI systems.
The return on investment for this extended monitoring is concrete: you catch hallucination regressions before they affect users, you see cost spikes before they hit your invoice, and you have the data to debug why your AI system is generating poor outputs even when every traditional APM metric is green.
Conclusion
The gap between traditional APM and AI-aware monitoring is real, but it is bridgeable. Your existing infrastructure is a foundation, not a liability. By extending your instrumentation to capture token counts and quality signals, expanding your time-series store to store AI-specific metrics, redesigning dashboards for the multi-component latency profile of LLM inference, and adding alerting rules for the new failure modes that only AI systems exhibit, you build a monitoring practice that gives you genuine visibility into production AI.
The teams that get this right do not just monitor whether their AI service is up. They monitor whether their AI is working correctly, efficiently, and safely - and they catch the failures that traditional APM would never see.