LLM observability
The LLM observability dashboard gives engineers a focused view of model activity in existing trace and log data. It finds supported LLM telemetry at read time, turns different instrumentation formats into common measures, and presents traffic, token use, cost, latency, sessions, tools, agents, and errors at /llm.
Dashboard scope
LLM telemetry scope
An LLM span is a timed trace record that describes a model call, tool action, agent action, or related LLM work. The dashboard selects a trace source and a time range, then applies optional query, session, and user filters to all views. It also accepts a separate log source so engineers can compare LLM trace errors with related error log events.
The dashboard is in beta. It is retroactive because it reads attributes and events from stored telemetry instead of requiring a new intake path or a new storage format. Supported data comes from OpenTelemetry GenAI semantic conventions, OpenLLMetry, OpenInference, and the Vercel AI SDK.
See Dashboards and visualization for the shared dashboard model and Service and infrastructure views for similar source and time-range analysis.
References: packages/…/LLMDashboardPage.tsx• L60-80 packages/…/LLMDashboardPage.tsx• L94-212 packages/…/LLMDashboardPage.tsx• L336-366 packages/…/LLMEmptyStateBanner.tsx• L9-37
Query-time normalization
The dashboard uses a common set of derived values for model, provider, operation, tokens, cost, latency, session, user, agent, tool, finish reason, and error state. These values are read from the source attribute map and matched across the supported key names. The same rules work when the source stores attributes as a string map or as JSON.
Numeric values use the greatest matching value instead of adding values from several dialects. This prevents one span from counting the same usage twice when an instrument emits equivalent keys in more than one convention. The expressions also combine cache-read and cache-write counts with input counts according to the convention used by the source, so token totals represent the full processed context.
The shared view lets charts and row views use one meaning for data from different SDKs. A source with no recognized LLM markers does not enter the LLM scope, so ordinary application spans do not inflate LLM results. Tool rows can be identified by a tool name, a tool call identifier, or the OpenInference tool span kind.
References: packages/…/useLLMDashboardExpressions.ts• L8-31 packages/…/expressions.ts• L14-48 packages/…/expressions.ts• L66-113 packages/…/expressions.ts• L218-420 packages/…/detect.ts• L84-103
Telemetry interpretation
Semantic-convention adapters
An adapter is a small translator from one telemetry format into the dashboard's common message model. The adapter set accepts current attribute-based GenAI messages, older event-based GenAI messages, OpenLLMetry indexed attributes, OpenInference message attributes, and Vercel AI SDK payloads.
The dashboard tries adapters in a fixed order. The current attribute form has priority over older event data when both exist. Each successful adapter returns input and output messages plus the dialect used to interpret them. This prevents one span from showing the same conversation twice when an instrument emits more than one representation.
References: packages/…/index.ts• L8-20 packages/…/semconvAttributes.ts• L11-17 packages/…/semconvEvents.ts• L11-17 packages/…/openllmetry.ts• L16-21 packages/…/openinference.ts• L18-23 packages/…/vercelAi.ts• L11-15
Span and message extraction
Span extraction creates a compact summary for each recognized LLM span. It favors the provider-resolved model over the requested model, then adds provider, operation, session, time to first token, finish reason, tool, agent, request parameters, and usage when those values exist. The span overview presents these values as model, provider, operation, tool, and agent labels with token usage and cost when cost analysis is enabled. It also shows a requested model when it differs from the response model.
Message extraction creates a single ordered conversation from input and output payloads. It keeps roles, text, tool calls, tool results, and call identifiers when the source provides them. The conversation view renders message text as Markdown and shows tool calls as expandable blocks with readable JSON arguments. Rich content that cannot be shown as text is reduced to display text, so the session view remains readable. A span can still show usage and parameters when its instrumentation did not capture message content.
See Trace investigation for the broader span detail flow.
References: packages/…/extract.ts• L172-225 packages/…/messages.ts• L9-45 packages/…/types.ts• L18-37 packages/…/LLMSpanSubpanel.tsx• L11-99 packages/…/ChatMessageItem.tsx• L33-104 packages/…/SessionSpanDetail.tsx• L64-93
Analysis views
Overview charts
The Overview tab gives a fast health view of LLM traffic. It combines headline measures with time trends and grouped views so an engineer can move from total activity to the model, service, user, or error group that needs attention.
| View group | Main questions answered |
|---|---|
| Traffic and health | How many calls and tokens occurred? What are the cache hit and error rates? |
| Model and service views | Which models and services receive the most calls or tokens? |
| User and error views | Which users account for activity? Which error messages occur most often? |
| Agent and tool views | Which agents and tools run most often? How often do tools fail? |
Rows in the model, service, user, tool, agent, and error views can open a search view with the matching LLM scope. This connects a high-level chart result to the raw telemetry that explains it.
References: packages/…/LLMDashboardPage.tsx• L336-365 packages/…/OverviewCharts.tsx• L41-214 packages/…/TokenCostCharts.tsx• L27-233 packages/…/AttributionCharts.tsx• L24-160 packages/…/AgentToolCharts.tsx• L30-240
Token and cost analysis
Token analysis separates uncached input, cached input, cache writes, ordinary output, and reasoning output. It also reports total tokens and cache hit rate. The dashboard accounts for the two common token conventions: some emitters include cache tokens inside input counts, while others report them as separate counts.
Cost analysis resolves each call in two steps. An instrumentation-provided cost has priority. If it is absent, the dashboard estimates cost from token usage and the bundled model price catalog. The estimate can apply a lower cache-read price or a higher cache-write price when the catalog defines those rates, so the result is useful for trend analysis but is not a provider invoice.
Usage and cost totals also choose an authoritative row set per service. When one service reports an instrumentation cost, the dashboard uses those cost rows for that service. A service without provided costs uses its reported-token rows instead. This avoids counting wrapper spans and primary spans for the same call while preserving token-only services in the same scope.
References: packages/…/cost.ts• L23-85 packages/…/expressions.ts• L291-387 packages/…/expressions.ts• L513-569 packages/…/TokenCostCharts.tsx• L68-197 packages/…/LLMSpanSubpanel.tsx• L16-47
Latency and efficiency views
Latency views show p95 call latency by model and time to first token when the instrumentation reports it. The Latency tab adds a duration heatmap that compares a selected group with the rest of the LLM traffic and ranks attributes that differ.
The heatmap can turn a selected attribute value into a dashboard filter. This makes it possible to move from a slow region to a model, provider, or other LLM attribute without rebuilding the query by hand. Efficiency views add cache hit trends and finish-reason groups, which can expose prompt-cache changes or response truncation.
References: packages/…/LatencyCharts.tsx• L13-77 packages/…/LatencyTab.tsx• L18-24 packages/…/LatencyTab.tsx• L64-102 packages/…/EfficiencyCharts.tsx• L19-83
Error and attribution views
The Errors tab shows error-status LLM trace spans and correlated error-severity LLM log events as separate row views. The selected source, time range, query, and session scope apply to both views. A log source is optional; without one, the trace error view still works and the log view asks the engineer to select a source.
Attribution views group activity by end-user identity when the telemetry includes a supported user field. Agent and tool views group model work by agent name and tool name, then show volume, tokens, cost where enabled, errors, and duration. These groups help connect model activity to the user or workflow that caused it.
See Search and log exploration for the general row search and log investigation experience.
References: packages/…/ErrorsTab.tsx• L17-23 packages/…/ErrorsTab.tsx• L34-97 packages/…/AttributionCharts.tsx• L24-68 packages/…/AgentToolCharts.tsx• L30-78
Session investigation
Session grouping
A session is a group of LLM spans and related events that share a conversation or work identifier. The dashboard resolves a session from the GenAI conversation identifier, the general OpenTelemetry session identifier, or the Vercel AI SDK session metadata. This gives engineers a correlation path even when an instrument does not preserve trace context across every step.
The Sessions tab lists each session in the selected time range with its start, duration, LLM call count, tool call count, models, tokens, cost, and errors. The session selector can scope every dashboard tab to one identifier. A user selector provides a parallel way to scope the dashboard to one end user.
References: packages/…/expressions.ts• L145-149 packages/…/SessionSelect.tsx• L9-14 packages/…/SessionSelect.tsx• L30-63 packages/…/SessionsTab.tsx• L38-45 packages/…/SessionsTab.tsx• L69-155 packages/…/LLMDashboardPage.tsx• L295-312
Session timeline
Selecting a session opens a chronological drawer with the session's LLM and tool spans. Each row shows the time, span name, model or tool, token use, and cost when available. The drawer also gives session totals and links to a filtered dashboard or to the general search view.
The conversation for a span loads only when the engineer expands that row. The first query carries small summary fields for the timeline. The later query fetches the selected span's attributes and then applies the appropriate adapter. This keeps large prompt histories from slowing the whole session view.
The timeline shows the first 100 spans in the selected range. The session total still reports the full span count, so a truncated display is visible rather than mistaken for a complete session.
See Session replay and exploration for the related session-oriented investigation model.
References: packages/…/LLMSessionPanel.tsx• L32-39 packages/…/LLMSessionPanel.tsx• L106-205 packages/…/LLMSessionPanel.tsx• L234-315 packages/…/SessionSpanDetail.tsx• L15-19 packages/…/SessionSpanDetail.tsx• L32-73
Investigation flow
The dashboard moves from broad measures to a specific span through linked scopes. The main path is:
- Select a trace source and time range.
- Review overview, latency, session, or error views.
- Narrow a chart or heatmap with a query, attribute, user, or session filter.
- Open a matching search view or a session drawer.
- Expand a span to inspect its normalized summary and captured messages.
The same source, time range, and filter state stays in the page URL. This makes a useful session or chart result easy to share and lets the search view continue the investigation without losing its LLM scope.
The relationship between dashboard scope, session detail, and raw search is shown below.
flowchart LR
Telemetry[Stored traces and logs] --> Scope[Source, time range, query, user, session]
Scope --> Charts[Preconfigured LLM charts]
Charts --> Groups[Model, user, agent, tool, error groups]
Groups --> Search[LLM-scoped search]
Scope --> Sessions[Session list]
Sessions --> Drawer[Session timeline]
Drawer --> Span[Expanded span summary and messages]
References: packages/…/LLMDashboardPage.tsx• L156-212 packages/…/LLMDashboardPage.tsx• L336-366 packages/…/chartConfig.ts• L162-184 packages/…/LLMSessionPanel.tsx• L118-126 packages/…/LLMSessionPanel.tsx• L265-279
Change checklist
When these files or sections are changed, remember to consider these:
- When adding or changing an instrumentation dialect, keep detection, SQL field expressions, message adapters, adapter precedence, and normalized token and session keys aligned.
- When changing attribute storage or source metadata, keep string-map and JSON access paths valid for both trace and log sources.
- When changing model prices or cost fields, preserve provided-cost priority and the per-service election used by all aggregate views.
- When changing session identifiers, update trace grouping, log correlation, the session selector, the drawer filter, and search links together.
- When changing message payload shapes, keep lazy span detail loading separate from the small session timeline query.
- When changing span summary or message display fields, keep the compact overview and expanded conversation views aligned with the normalized span data.
- When adding a chart or tab, preserve the shared source, time, query, language, user, and session scope so linked views do not disagree.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A span has no supported LLM marker | It is excluded from the dashboard and the empty-state message can appear | Emit a recognized GenAI, OpenLLMetry, OpenInference, or Vercel AI marker in the telemetry attributes or events |
| The model is absent from the price catalog and no cost is provided | The call has no estimated cost | Treat cost as an estimate and provide an instrumentation cost when exact billing data is needed |
| One service emits duplicate wrapper and primary spans | Calls, tokens, or cost can be overstated | Keep authoritative usage or cost fields on the app's per-call reporter so the service-level election can select it |
| A service reports provided cost for only some calls | Usage or cost can be undercounted for that service | Keep the cost-reporting convention consistent across the service's calls |
| Message capture is disabled | The span summary can show usage without a conversation | Enable prompt and completion capture when message inspection is required |
| A session identifier is missing or differs between traces and logs | The session list or cross-signal error view cannot correlate all activity | Propagate one supported session identifier across the related telemetry |
| A session contains more than 100 spans | The drawer shows only the first 100 timeline rows | Use the displayed total span count and narrow the time or session scope for a smaller investigation |
| No log source is selected | The Errors tab cannot show correlated LLM log events | Select a log source linked to the trace data |
Key files
| File | Why to read it |
|---|---|
| packages/…/LLMDashboardPage.tsx | Defines the /llm page, shared controls, tabs, and page-wide scope. |
| packages/…/detect.ts | Defines which telemetry is recognized as LLM activity. |
| packages/…/expressions.ts | Defines common query-time measures, token conventions, tool fields, and aggregate de-duplication rules. |
| packages/…/extract.ts | Defines the normalized span summary and usage fields. |
| packages/…/messages.ts | Connects dialect adapters to the normalized conversation view. |
| packages/…/index.ts | Shows supported message dialects and their precedence. |
| packages/…/cost.ts | Defines provided-cost priority and model-price estimates. |
| packages/…/OverviewCharts.tsx | Shows the main traffic and health chart set. |
| packages/…/TokenCostCharts.tsx | Shows token split, cost trends, model breakdowns, and service links. |
| packages/…/LatencyTab.tsx | Shows interactive latency comparison and attribute filtering. |
| packages/…/ErrorsTab.tsx | Shows trace and log error investigation side by side. |
| packages/…/SessionsTab.tsx | Shows session-level grouping and investigation entry points. |
| packages/…/LLMSessionPanel.tsx | Shows the session timeline, totals, and links to deeper views. |
| packages/…/LLMSpanSubpanel.tsx | Shows the compact span summary, usage, cost, and request details. |
| packages/…/ChatMessageItem.tsx | Shows normalized message text and expandable tool calls. |
| packages/…/SessionSpanDetail.tsx | Shows on-demand span summaries and captured conversations. |