Measures & aggregations
The full catalog of what an alert can watch on runs and spans — duration, cost, tokens, error rate, tool calls, users — and which aggregations apply to each.
A measure is the number an alert watches. An aggregation is how a window of rows becomes one value. Only the aggregations that make sense for a measure are offered, so you can't ask for the average of a count.
Aggregations
| Aggregation | What it does | Offered on |
|---|---|---|
count | How many rows are in the window. | Runs, Spans |
rate | What share of rows errored, as a percent. | Error rate |
avg | The mean of the values. | Every numeric measure |
sum | The total. | Every numeric measure |
min / max | The smallest / largest value. | Every numeric measure |
p50 p75 p90 p95 p99 | Percentiles. p95 means 95% of rows were at or below this. | Every numeric measure |
distinct | How many unique values. | Users |
Rows with no value for the measure are not counted. Ten runs where four recorded no cost give you an average over four, not ten spread across ten — the number means what it says.
Run measures
Scope an alert to runs when the question is about whole agent executions.
| Measure | Unit | Aggregations | Watch for |
|---|---|---|---|
| Runs | count | count | Traffic drops or spikes. Pair with below to catch an agent that has gone silent. |
| Error rate | percent | rate | The share of runs that failed. Needs 5+ runs in the window. |
| Duration | ms | avg sum min max p50–p99 | End-to-end latency. Use p95. |
| Cost | USD | avg sum min max p50–p99 | sum for spend in a window; p95 for a runaway individual run. |
| Tokens in | count | avg sum min max p50–p99 | Prompts growing — often the first sign of context bloat. |
| Tokens out | count | avg sum min max p50–p99 | Responses growing longer than intended. |
| Tokens total | count | avg sum min max p50–p99 | Combined in + out. |
| Tool calls | count | avg sum min max p50–p99 | p95 catches agents stuck in a tool loop. |
| Satisfaction | score | avg sum min max p50–p99 | Quality sliding, when you record satisfaction. |
| Rage | score | avg sum min max p50–p99 | Frustration, from the browser SDK. |
| Feedback rating | score | avg sum min max p50–p99 | Explicit thumbs / ratings from users. |
| Users | count | distinct | How many distinct users were affected. Pair with a filter on the failing thing. |
Span measures
Scope an alert to spans when the problem is a specific step — a model, a tool, a retrieval.
| Measure | Unit | Aggregations | Watch for |
|---|---|---|---|
| Spans | count | count | Volume of a specific step. |
| Error rate | percent | rate | A single tool or model failing. Needs 5+ spans in the window. |
| Duration | ms | avg sum min max p50–p99 | The slow step inside an otherwise fine run. |
| Cost | USD | avg sum min max p50–p99 | Spend attributable to one model or provider. |
| Input tokens | count | avg sum min max p50–p99 | Prompt size on a specific LLM node. |
| Output tokens | count | avg sum min max p50–p99 | Response size on a specific LLM node. |
How units are shown
Trodo formats a value in the measure's own units everywhere it appears — in the list, on the chart, and in the notification.
| Unit | Example |
|---|---|
| ms | 840 ms, 4.2 s |
| USD | $0.0231, $1.40, $126 |
| percent | 4.3%, 27% |
| score | 3.85 |
| count | 1,204 |
Type the raw number into the threshold box — 8000 for eight seconds, 0.05 for five cents — and Trodo formats it back for you.
Choosing between them
A few pairings that come up often:
- "Our agent got slow." Run · Duration ·
p95. Then, to find where, Span · Duration ·p95filtered to one tool at a time. - "We're burning money." Run · Cost ·
sumover 1 hour to catch the bill; Run · Cost ·p95to catch one pathological run. - "Something is broken." Run · Error rate ·
rateover 15 min. Narrow to Span · Error rate filtered bytool_nameonce you know which step. - "The agent has stopped being used." Run · Runs ·
count, operator below, over an hour. A silent integration looks identical to a healthy one otherwise. - "How many people did this hit?" Run · Users ·
distinct, filtered to the failure.
Next
- Filters — narrowing which rows count
- Create an alert