Trace slower than budget
Find out what the Trace slower than budget rule checks, what it needs, and how to set its latency budget.
Definition
Trace slower than budget (trace_duration_bound) flags a request when its end-to-end duration exceeds a budget you set. It checks each trace, which is one request, as a whole.
Property | Value |
Unit | trace |
Check kind | deterministic |
Category | Operational thresholds |
Score type | Pass or fail |
Default severity | LOW |
The rule applies to every trace that has at least one span. A trace fails when its duration in milliseconds is greater than Latency budget (ms). A trace that takes exactly the budget passes.
When a trace fails, the result records the trace's duration as the observed value and adds a short summary, for example: trace took 42150ms, budget 30000ms. You see this summary in the Checks panel for the trace and in the Check results popover from the Rules column on the trace list. For more about reading results, go to Explore traces.
Why it matters
The rule measures the whole trace, so it catches slowness that no single span causes on its own. For example, a request can be slow even when each model call and tool call is fast.
This rule checks every trace against a fixed limit. To catch latency that rises over time compared to its own history, use Latency regression instead.
What it requires
- Traces from your application in the project. To start sending them, go to Instrument your code.
- Permission to change rules in the project. For details, go to Project permissions.
This is a deterministic check, so it makes no model calls and doesn't need a judge model.
Results for a trace can be updated as more of the trace arrives. When the rule reads the same trace again, the new result replaces the earlier one.
Parameters
Parameter | Required | Default | Allowed values |
Latency budget (ms) | Yes |
| A whole number, 1 or more |
Latency budget (ms) is the end-to-end duration, in milliseconds, above which a trace fails.
Configuration examples
The following table shows example budgets.
Latency budget (ms) | Effect |
| Fails any request that takes longer than 5 seconds. |
| The default. Fails any request that takes longer than 30 seconds. |
| Fails only requests that take longer than 2 minutes. |
To set up this rule:
- On the Rules page of your project, select + New rule.
- On the New rule page, in Search templates, enter
trace_duration_bound, and then select Configure › on the Trace slower than budget card.
- On the Configure rule page, check Name, which defaults to the template name and your project, for example
Trace slower than budget — checkout-api. - For Latency budget (ms), enter your budget, for example
5000. - For Severity, select a level if you don't want the default of LOW.
- Select Save & enable.
For every field on the form, go to Create a rule.
If the budget isn't valid, the form shows one of these messages after you select Save & enable:
- "Latency budget (ms) is required."
- "Latency budget (ms) must be a whole number."
- "Latency budget (ms) must be at least 1."
Related
- Latency regression compares recent p95 latency against its own baseline.
- Request over token budget puts a limit on the tokens one request uses.
- Trace contains failed spans flags requests where a span ended in error.

Have a suggestion?