Measures & filters
Every number an alert can watch on runs, spans and eval results, the aggregations each one takes, and every field and operator you can filter on.
A measure is the number an alert watches. An aggregation is how a window of rows becomes one value. A filter decides which rows are counted at all. This page lists all three for each scope.
Aggregations
| Aggregation | What it does | Offered on |
|---|---|---|
| count | How many rows are in the window. | Counts: Runs, Spans, an eval's Failures and the like |
| rate | The share of rows that errored (or, for an eval, passed), as a percent. | Error rate, Pass rate |
| average, sum, min, max | The mean, total, smallest or largest value. | Every numeric measure |
| p50, p75, p90, p95, p99 | Percentiles: p95 means 95% of rows were at or below this. | Every numeric measure |
| unique | How many distinct values. | Users |
Rows with no value for the measure are left out. Ten runs where four recorded a cost give an average over those four.
A rate needs at least 5 rows in the window, and so does an eval's Score; below that the alert is in no data and can't fire. One failing run out of one is a 100% error rate, not an incident.
Run measures
Scope Run when the question is about whole agent executions.
| Measure | Unit | Aggregations | Watch for |
|---|---|---|---|
| Runs | count | count | Traffic drops or spikes. With below, an agent that has gone silent. |
| Error rate | % | rate | The share of runs that failed: status error, or any failed span. |
| Duration | ms | numeric | End-to-end latency. Use p95. |
| Cost | $ | numeric | sum for spend in a window; p95 for one runaway run. |
| Tokens in, Tokens out, Tokens total | count | numeric | Prompts or answers growing. |
| Tool calls | count | numeric | p95 catches agents stuck in a tool loop. |
| Satisfaction | score | numeric | Quality sliding, from your users' feedback. |
| Rage | score | numeric | Frustration signals. |
| Feedback rating | score | numeric | The ratings users give. |
| Users | count | unique | How many people were affected. Pair it with a filter on the failure. |
Numeric means average, sum, min, max and p50 to p99.
Span measures
Scope Span when the problem is one step: a model, a tool, a retrieval.
| Measure | Unit | Aggregations | Watch for |
|---|---|---|---|
| Spans | count | count | Volume of a step, or with a status filter, failures of it. |
| Error rate | % | rate | One tool or model failing: status error, or an error type recorded. |
| Duration | ms | numeric | The slow step inside an otherwise fine run. |
| Cost | $ | numeric | Spend on one model or provider. |
| Input tokens, Output tokens | count | numeric | Prompt or answer size on one model call. |
Eval measures
Scope Eval to watch one eval's results: its final decision on each run, span or conversation, never its individual steps. Audit samples and backfilled results are left out, except where a measure is about audits.
| Measure | Counts | Aggregations |
|---|---|---|
| Failures | Results the eval decided were a fail. | count |
| Pass rate | The share of decided results that passed. | rate |
| Decisions | Results the eval decided, pass or fail. | count |
| Errored | Results the eval could not decide, because a step errored. | count |
| Waiting for a person | Results waiting in human review. | count |
| Score | The score on decided results. | numeric, at least 5 results |
| Marked wrong | Results someone marked as wrong. | count |
| Audit disagreements | Audit samples where the eval's cheap path and its full path came out differently. | count |
Failures and Pass rate watch your agent. Marked wrong and Audit disagreements watch the eval itself: they are what a self-improving eval listens for.
Filters
Without a filter, an alert counts every row of its scope (for an eval, every result of that eval). A filter narrows it to a slice: one agent, one tool, one model, one customer. Each rule is field · operator · value, and every rule must match.
The value box suggests values the field has held recently, but anything you type is accepted: an alert is often about something that hasn't happened yet.
Run fields
Agent, Status, Duration (ms), Cost, Tokens in, Tokens out, Tool calls, Spans, Errors, Error type, Error message, Error category, Level, User, Conversation, Parent run, Feedback rating, Satisfaction, Rage.
Span fields
Agent, Kind, Name, Status, Tool, Model, Provider, Duration (ms), Cost, Tokens in, Tokens out, Error type, Error message, Error category, User, Conversation.
A span alert can also filter on every run field, under Its run: slow tool calls, but only in runs of the checkout agent is one alert.
Eval fields
| Field | What it is |
|---|---|
| Ending | Where the result finished: the verdict step it reached, offered by the step's name, including endings that haven't happened yet. It keeps working when the eval is edited. |
| Reason | The reason code the result gave. |
| Agent | The agent of the run, span or conversation that was scored. |
| Scored | What was scored: a run, a span or a conversation. |
| Version | The eval version that decided it. |
Error category
Error category sorts a failed run or span the way the Failures view does: Timeout, Rate limited, Auth, Not found, Refused, Bad request, Server error, Connection, Code error or Other. Every category is offered, seen or not, so an alert on rate limits can exist before the first one. Rows that didn't fail have no category.
Your own metadata and attributes
Any key you send as run metadata or attributes, or as span attributes, is a filter field too. Trodo finds the keys your team sent in the last 7 days and lists them in the field picker under their own headings: Run metadata and Run attributes on a run alert, Span attributes and Its run · metadata on a span alert. A key whose values are all numbers gets the number operators.
Send metadata: { tenant: 'acme' } on your runs, and an alert can watch only Acme's error rate, with its own limit.
Operators
| Operator | For | What it does |
|---|---|---|
| is, is not | text, number | |
| contains, does not contain | text | Ignores case. |
| starts with, ends with | text | |
| is above, is at or above, is below, is at or below | number | |
| is set, is not set | text, number | Whether the field has a value at all. |
For error messages, prefer contains to is: a message gains an id or a duration in the next release, and an alert on the exact string goes quiet.
A missing value matches no comparison: a run with no duration does not match Duration is below 1000. To catch rows without a value, use is not set. There are no time filters; the alert's window is the time filter.
Pairings that come up often
- "Our agent got slow." Run · Duration · p95. Then Span · Duration · p95 filtered to one tool at a time to find where.
- "We're burning money." Run · Cost · sum over 1 hour for the bill; Run · Cost · p95 for one pathological run.
- "Something is broken." Run · Error rate over 15 minutes; then Span · Error rate filtered by Tool once you know which step.
- "Nobody is using it." Run · Runs · count, below, over an hour.
- "How many people did this hit?" Run · Users · unique, filtered to the failure.
- "The eval is failing more." Eval · Failures · count, or Eval · Pass rate below 90%.
Create an alert
Start an alert from a template, from Lucid, from scratch or from a failure, then walk the form: scope, measure, filters, condition, message and destination.
Notifications & monitoring
Where an alert sends when it fires, how to write the message and its variables, what the webhook receives, and how to read an alert's page: its value over time, its fires and where each was sent.