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

AggregationWhat it doesOffered on
countHow many rows are in the window.Runs, Spans
rateWhat share of rows errored, as a percent.Error rate
avgThe mean of the values.Every numeric measure
sumThe total.Every numeric measure
min / maxThe smallest / largest value.Every numeric measure
p50 p75 p90 p95 p99Percentiles. p95 means 95% of rows were at or below this.Every numeric measure
distinctHow 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.

MeasureUnitAggregationsWatch for
RunscountcountTraffic drops or spikes. Pair with below to catch an agent that has gone silent.
Error ratepercentrateThe share of runs that failed. Needs 5+ runs in the window.
Durationmsavg sum min max p50p99End-to-end latency. Use p95.
CostUSDavg sum min max p50p99sum for spend in a window; p95 for a runaway individual run.
Tokens incountavg sum min max p50p99Prompts growing — often the first sign of context bloat.
Tokens outcountavg sum min max p50p99Responses growing longer than intended.
Tokens totalcountavg sum min max p50p99Combined in + out.
Tool callscountavg sum min max p50p99p95 catches agents stuck in a tool loop.
Satisfactionscoreavg sum min max p50p99Quality sliding, when you record satisfaction.
Ragescoreavg sum min max p50p99Frustration, from the browser SDK.
Feedback ratingscoreavg sum min max p50p99Explicit thumbs / ratings from users.
UserscountdistinctHow 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.

MeasureUnitAggregationsWatch for
SpanscountcountVolume of a specific step.
Error ratepercentrateA single tool or model failing. Needs 5+ spans in the window.
Durationmsavg sum min max p50p99The slow step inside an otherwise fine run.
CostUSDavg sum min max p50p99Spend attributable to one model or provider.
Input tokenscountavg sum min max p50p99Prompt size on a specific LLM node.
Output tokenscountavg sum min max p50p99Response 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.

UnitExample
ms840 ms, 4.2 s
USD$0.0231, $1.40, $126
percent4.3%, 27%
score3.85
count1,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 · p95 filtered to one tool at a time.
  • "We're burning money." Run · Cost · sum over 1 hour to catch the bill; Run · Cost · p95 to catch one pathological run.
  • "Something is broken." Run · Error rate · rate over 15 min. Narrow to Span · Error rate filtered by tool_name once 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

On this page