Metrics
Reference for all available metrics, dimensions, aggregation functions, and filter operators in the dashboard query engine.
Metrics Reference
Dashboard widgets query one of five data views. Each view exposes a set of metrics you can aggregate and dimensions you can group by or filter on.
Data Views
Traces
One row per trace. Use this view for request-level monitoring.
Metrics
| Metric | Description |
|---|---|
count | Number of traces |
latency | End-to-end trace duration (ms) |
totalTokens | Sum of input + output tokens across all observations in the trace |
totalCost | Estimated cost (USD) across all observations |
uniqueUserCount | Distinct user IDs |
observationsCount | Number of observations (spans/generations) per trace |
scoresCount | Number of evaluation scores attached |
Dimensions
| Dimension | Description |
|---|---|
name | Trace name set by the SDK |
userId | User identifier passed at ingestion |
sessionId | Session identifier |
environment | Environment tag (e.g. production, staging) |
release | Release version string |
version | Application version |
tags | Free-form tags array |
Observations
One row per span, generation, or event. Use this view for model-level and operation-level analysis.
Metrics
| Metric | Description |
|---|---|
count | Number of observations |
latency | Observation duration (ms) |
streamingLatency | Streaming-specific latency (ms) |
timeToFirstToken | Time from request to first token (ms) |
tokensPerSecond | Overall throughput (tokens/s) |
outputTokensPerSecond | Output-only throughput (tokens/s) |
inputTokens | Input token count |
outputTokens | Output token count |
totalTokens | Input + output tokens |
inputCost | Estimated input cost (USD) |
outputCost | Estimated output cost (USD) |
totalCost | Total estimated cost (USD) |
countScores | Number of scores attached |
Dimensions
| Dimension | Description |
|---|---|
name | Observation name |
type | Observation type (GENERATION, SPAN, EVENT) |
level | Log level (DEFAULT, DEBUG, WARNING, ERROR) |
providedModelName | Model name as provided by the SDK |
promptName | Name of the prompt template used |
environment | Environment tag |
Sessions
One row per session (a group of related traces). Use this view for multi-turn conversation analytics.
Metrics
| Metric | Description |
|---|---|
count | Number of sessions |
traceCount | Average number of traces per session |
latency | Session duration (ms) |
totalTokens | Total tokens across all traces in the session |
totalCost | Total cost (USD) across the session |
Dimensions
| Dimension | Description |
|---|---|
sessionId | Session identifier |
userId | User identifier |
environment | Environment tag |
release | Release version string |
version | Application version |
tags | Free-form tags |
Scores (Numeric)
One row per numeric evaluation score. Use this view to track evaluation quality over time.
Metrics
| Metric | Description |
|---|---|
count | Number of scores |
avg | Mean score value |
min | Minimum score value |
max | Maximum score value |
p50 | Median score |
p75 | 75th percentile |
p90 | 90th percentile |
p95 | 95th percentile |
p99 | 99th percentile |
Dimensions
| Dimension | Description |
|---|---|
name | Score name (evaluator name) |
source | Score source (API, EVAL, HUMAN) |
dataType | Data type (NUMERIC, BOOLEAN) |
environment | Environment tag |
Scores (Categorical)
One row per categorical evaluation score.
Metrics
| Metric | Description |
|---|---|
count | Number of scores |
Dimensions
Same as Scores (Numeric): name, source, dataType, environment.
Aggregation Functions
| Function | Description |
|---|---|
count | Row count |
sum | Sum of values |
avg | Arithmetic mean |
unique | Count of distinct values |
min | Minimum value |
max | Maximum value |
p50 | 50th percentile (median) |
p75 | 75th percentile |
p90 | 90th percentile |
p95 | 95th percentile |
p99 | 99th percentile |
Percentile aggregations (p50–p99) are most meaningful for latency and cost metrics. They are computed using ClickHouse's quantile function.
Filters
You can add one or more filter conditions to any widget to restrict which rows are included in the query.
Filter Operators
| Operator | Applies to | Description |
|---|---|---|
equals | String, number | Exact match |
not equals | String, number | Exclude exact match |
contains | String | Substring match |
not contains | String | Exclude substring match |
starts with | String | Prefix match |
ends with | String | Suffix match |
greater than | Number | Numeric comparison |
less than | Number | Numeric comparison |
is null | Any | Field is absent/null |
is not null | Any | Field is present |
Multiple filters on the same widget are combined with AND logic.
Time Range and Granularity
All widgets operate on a time range (start date to end date). You can set a date preset per widget:
| Preset | Window |
|---|---|
| Last 1 hour | 1 h |
| Last 24 hours | 24 h |
| Last 7 days | 7 d (default) |
| Last 30 days | 30 d |
| Last 90 days | 90 d |
For time-series widgets, granularity controls how data is bucketed along the time axis:
| Granularity | Bucket size |
|---|---|
auto | Chosen automatically based on date range |
hour | 1 hour buckets |
day | 1 day buckets |
week | 7 day buckets |
month | Calendar month buckets |