Response Time SLA
SLA-based latency evaluation with configurable tiered thresholds. Define named tiers (e.g. "excellent," "acceptable," "degraded") with maximum duration and score values. The evaluator matches the span's duration against tiers in ascending order and returns the score for the first matching tier.
Config
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tiers | array | Yes | — | Array of tier objects, each with name (string), max_ms (number), and score (number, 0–1). Tiers are automatically sorted by max_ms ascending. |
Use Cases
- SLA enforcement — Define contractual response time tiers and automatically flag traces that breach your SLA thresholds.
- Tiered quality scoring — Differentiate between "excellent" (under 500ms), "acceptable" (under 2s), and "degraded" (under 5s) response times with proportional scores.
- Performance regression detection — Track SLA scores over time to catch latency regressions before they impact users.
- Per-endpoint budgets — Create different evaluator configs for different agent capabilities with appropriate latency budgets for each.
Examples
Three-tier SLA
{
"tiers": [
{ "name": "excellent", "max_ms": 500, "score": 1.0 },
{ "name": "acceptable", "max_ms": 2000, "score": 0.7 },
{ "name": "degraded", "max_ms": 5000, "score": 0.3 }
]
}
// 300ms → "excellent" (1.0)
// 1500ms → "acceptable" (0.7)
// 4000ms → "degraded" (0.3)
// 6000ms → SLA breach (0.0)Simple pass/fail threshold
{
"tiers": [
{ "name": "within_sla", "max_ms": 3000, "score": 1.0 }
]
}
// Under 3s → pass (1.0)
// Over 3s → SLA breach (0.0)Granular five-tier
{
"tiers": [
{ "name": "instant", "max_ms": 200, "score": 1.0 },
{ "name": "fast", "max_ms": 1000, "score": 0.9 },
{ "name": "normal", "max_ms": 3000, "score": 0.7 },
{ "name": "slow", "max_ms": 5000, "score": 0.4 },
{ "name": "critical", "max_ms": 10000, "score": 0.1 }
]
}Scoring
The span's duration is compared against tiers sorted by max_ms ascending. The score from the first tier where durationMs <= max_ms is returned (clamped to 0–1). If the duration exceeds all tiers, the score is 0.0 (SLA breach). A score greater than 0.0 is labeled "pass"; 0.0 is labeled "fail." The reasoning field includes the actual duration and the matched tier name.
Performance
Purely deterministic with no external API calls. Runs in under 1ms — just a linear scan through the sorted tier list. No text processing is involved; the evaluator only reads the span's duration metadata. Returns a fail immediately if no duration data is available on the span.