tools for LLM monitoring
Summary
- LLM monitoring tracks the model calls themselves: request volume per model and caller, tokens, latency, errors, spend and the quality of what comes back.
- The most complete view comes from a gateway that every model call passes through, paired with traces and LLM judges for output quality.
- Look for per-request usage records with the caller's identity, rate limits per user or group, fallbacks across model destinations, and payload logging under access control.
- In open source, MLflow Tracing records each LLM call as a span with token usage and latency, and OpenTelemetry's GenAI semantic conventions give those calls a shared vocabulary.
- On Databricks, Unity Gateway (GA) logs every governed model request to the
system.ai_gateway.usagesystem table, so model usage can be queried with SQL.
tools for LLM monitoring
LLM monitoring watches the model calls your applications make: how many requests each model gets and from whom, how many tokens they use, how long they take, how often they fail, what they cost, and whether the output clears your quality bar. The strongest setup puts a gateway in front of every model, so each call is logged in one place, and pairs it with tracing and LLM judges for quality. Pick tools that write each call to a governed table you can query, enforce limits per team, and route around a failing model.
What is LLM monitoring?
It's the model-level slice of observability. Application monitoring asks whether a feature works. LLM monitoring asks how each model is being used and how it's behaving, across every app that calls it.
| What to monitor | Why it matters | Where the signal comes from |
|---|---|---|
| Requests per model and caller | Capacity planning and chargeback | Gateway usage records |
| Input, output, cached and reasoning tokens | The main driver of cost | Gateway usage records and trace spans |
| Latency and time to first byte | What users feel, especially when streaming | Gateway usage records and trace spans |
| Status codes and rate-limit hits | Provider outages, quota pressure, bad requests | Gateway usage records |
| Spend | Budgets and forecasting | Spend and billing tables |
| Request and response payloads | Audit, debugging and evaluation data | Payload logging tables |
| Output quality | Hallucination, unsafe content, ignored instructions | LLM judges scoring traces |
Key capabilities to evaluate
- One control point for every model. Hosted, external and open models behind one interface, so nothing is called around the monitoring.
- Per-request records with identity. Who called which model, with which tags, and what happened.
- Limits. Requests-per-minute and tokens-per-minute caps for a service, a user or a group.
- Resilience. Traffic splitting and fallbacks, so one provider's errors don't take an app down.
- Payload logging under permissions. Prompts and responses are sensitive, so reads need the same controls as other data.
- Quality scoring. LLM judges for groundedness, relevance and safety on real traffic.
- Open standards. OpenTelemetry support, so model-call telemetry can move between backends.
In open source, MLflow Tracing records every LLM call as a span with inputs, outputs, latency and token usage, rolled up per trace. MLflow natively supports the OpenTelemetry GenAI semantic conventions and can export traces to any OpenTelemetry-compatible backend. MLflow also ships an open-source gateway component that covers rate limits, fallbacks and cost control.
Querying model usage with SQL
On Databricks, every request through Unity Gateway lands in the system.ai_gateway.usage system table, which covers model services, model provider services and MCP services. This query summarizes the last week by model:
SELECT
destination_model,
COUNT(DISTINCT request_id) AS requests,
SUM(input_tokens) AS input_tokens,
SUM(output_tokens) AS output_tokens,
AVG(latency_ms) AS avg_latency_ms,
AVG(time_to_first_byte_ms) AS avg_ttfb_ms
FROM system.ai_gateway.usage
WHERE event_time >= current_timestamp() - INTERVAL 7 DAYS
GROUP BY destination_model
ORDER BY requests DESC;
Add requester or request_tags to the grouping for per-user or per-project views. Records are typically available within one hour. By default, querying the table requires both account admin and metastore admin roles, and admins can grant access to others.
How Databricks approaches LLM monitoring
Unity Gateway is the generally available Databricks governance layer for enterprise AI, part of Unity Catalog. For monitoring, it provides:
- Usage records.
system.ai_gateway.usageholds token counts,token_details(cache and reasoning tokens),latency_ms,time_to_first_byte_ms,status_code,requesterandrequest_tagsper request. - Spend.
system.ai_gateway.external_model_spendstores estimated spend for external models, aggregated hourly, and a built-in Cost Analysis dashboard draws on the usage and billing tables. - Dashboards. A usage dashboard tracks request volume, token consumption and latency for every endpoint governed through the gateway.
- Inference tables. Raw JSON request and response payloads from model services, logged to Unity Catalog Delta tables.
- Rate limits. QPM and TPM limits per service, per user, per group or per service principal. Exceeding one returns HTTP 429.
- Routing and fallbacks. Traffic splitting across model backends behind one service, and fallbacks that retry a failed request against backup destinations.
- Permissions. AI assets are registered as Unity Catalog securables, so access uses the same grants as your data.
For output quality, MLflow judges such as RetrievalGroundedness, Safety and Guidelines run on Databricks-hosted LLMs and attach scores to traces. See Unity Gateway observability and track model usage.
FAQs
What's the difference between LLM monitoring and LLM observability?
Monitoring tracks known signals such as usage, latency, errors and spend. Observability adds the full trace of each request and quality assessments, so you can explain a failure you didn't anticipate.
How do I monitor spend on external model providers?
Route those calls through a gateway that records usage and estimated spend. On Databricks, that's the system.ai_gateway.external_model_spend table and the Cost Analysis dashboard.
Can I cap LLM usage per team?
Yes. Group rate limits on Unity Gateway are shared by all members of the group, and limits for individual users or service principals take priority over them.
Do gateway logs replace tracing?
No. A gateway sees each model call but not the retrieval, tool and reasoning steps inside your app. Use both.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.