Skip to main content
Version: next

Dashboard: Usage

The Usage page provides aggregate analytics, per-model performance breakdown, and per-request logs across all projects. Use it to understand spending patterns, investigate errors, and drill into individual request traces.


Summary Statistics​

The top row shows aggregated totals for the selected filter set:

Usage page showing summary cards, filters, per-model breakdown, and call log

CardDescription
Total CostUSD cost of all successful calls in the period
Total CallsAll usage records (completion + routing + guardrail + blocked)
Completion CallsMain model inference calls, with their total cost
Router CallsLLM routing policy calls (e.g. the llm routing policy), with cost
Guardrail CallsModel calls made by security rules (semantic, topic, moderation), with cost
Blocked CallsRequests blocked by a guardrail rule before reaching any model. Shown only when at least one blocked call exists in the period.
ErrorsFailed model calls -- blocked calls are counted separately and excluded from this number

Guardrail judge calls are charged to the project like any other model call and are subject to the project's budget limits. Blocked requests record zero cost and zero tokens.


Filters​

FilterDescription
PeriodPreset time window (today, this month, etc.) or custom range
ProjectFilter to a specific project
ModelFilter to specific model IDs
TypeAll, Completion, Router, or Guardrail -- filters by call sub-activity type
StatusAll, Success, Blocked, or Error -- Blocked shows only guardrail-blocked requests
Session IDFilter to requests from a specific session (from the x-routerly-conversation-id header)
TagsFilter by token metadata (e.g., environment: production)

Filters are applied immediately and affect the summary cards, the per-model breakdown table, and the request log simultaneously.

Session tracking and custom metadata

Use the Session ID filter to view all requests from a specific conversation or user session. Use the Tags filter to analyze traffic by team, environment, application, or any custom dimension you tag your tokens with.


Per-Model Breakdown​

Below the summary cards, a table ranks all models that received traffic in the selected period.

ColumnDescription
ModelProvider model identifier
ProviderProvider name
CallsTotal requests in the period
ErrorsFailed calls
Success RatePercentage of successful completions
Avg LatencyMean response time
P95 Latency95th-percentile response time
Input TokensTotal input tokens consumed
Output TokensTotal output tokens produced
Last UsedTimestamp of the most recent call
Total CostTotal spend for this model in the period

A star marks the model with the best cost-performance ratio based on your own traffic. The table respects all active filters.

Redirected from /dashboard/leaderboard

The standalone Leaderboard page has been merged into this page. /dashboard/leaderboard redirects to /dashboard/usage.


Usage Table​

The table lists individual requests with:

ColumnDescription
TimestampWhen the request arrived
ProjectThe project the request belonged to
ModelProvider model used
TypeAPI type (chat, responses, messages)
StatusOutcome
Input TokensInput token count
Output TokensOutput token count
CostEstimated cost in USD
LatencyTime to first byte / total response time

The Status badge in the table uses colour coding:

OutcomeBadge colour
successGreen
blockedAmber
error / otherRed

Click any row to open the full Trace view.

Trace View​

The trace view shows the complete lifecycle of a single request:

  1. Router Request -- the routing engine's input: the project slug, requested model (if any), and active policies
  2. Router Response -- which model was selected and why (policy scores listed)
  3. Model Request -- the actual payload sent to the provider
  4. Model Response -- the raw provider response including all tokens and finish reason

The trace also includes guardrail and PII entries when those features are active:

Trace entryWhen
guardrail:evaluatedAfter every guardrail check -- shows each rule's outcome (passed, triggered, or skipped) and reason, even when no rule fires
guardrail:triggeredA request-side rule matched with log action (request continued)
guardrail:response-triggeredA response-side rule matched with log action (response continued)
pii:scrubbedPII was detected and replaced in the request or response

For a blocked request (judged rule that triggers), the trace includes the guardrail:evaluated entry and the block message (from the judge's reason field, or a built-in default if the judge fails). The block message is stored on the trace only and is not included in the wire response sent to the client.

The detail panel for each usage record shows:

FieldDescription
Guardrail TriggeredIdentifier of the first rule that fired (e.g. regex:pattern, injection:dan-mode, topic:gpt-4o-mini)
Blocked BySame as Guardrail Triggered -- present only when outcome is blocked
PII RedactedComma-separated list of entity types redacted (e.g. EMAIL, PHONE)
Session IDSession identifier from the x-routerly-conversation-id header, if provided (useful for grouping multi-turn conversations or user sessions)
TagsCustom metadata from the token that made the request (e.g., environment: production, team: backend); enables filtering and analysis by custom dimensions

Live Polling​

The page starts in Live mode, which refreshes every 2 seconds. A red pulsing badge appears next to the page title while Live is active.

To change the refresh interval, click any option in the interval selector directly. Doing so automatically exits Live mode and applies the selected interval:

IntervalMeaning
LiveRefresh every 2 seconds (default on page load)
OffManual refresh only (click the refresh button)
5 sRefresh every 5 seconds
15 sRefresh every 15 seconds
30 sRefresh every 30 seconds
1 minRefresh every minute
5 minRefresh every 5 minutes

The Period filter (date range picker) works independently of Live mode. You can change the displayed time window at any time, even while Live polling is active, without turning it off first.


Exporting Usage Data​

Usage data is stored in ~/.routerly/data/usage.json as newline-delimited JSON. You can process it with any standard tool:

# Total cost this month
cat ~/.routerly/data/usage.json | \
jq -r 'select(.timestamp | startswith("2025-07")) | .cost' | \
awk '{sum+=$1} END {printf "Total: $%.4f\n", sum}'

For programmatic access, use the Usage API.