// PART 14
SLOs and on-call
The service-level objectives, the burn-rate policy that turns them into pages, and the people who own each scope — all sourced from ops/slo.yaml.
Where the numbers live
ops/slo.yaml is the machine-readable source of truth; the dashboard in
Analytics → Operations → SLO burn & error budget (GET /api/ui/analytics/ops/slo) renders it, and scripts/check_slo.py gates CI on
it. A target never moves silently: it changes through a reviewed pull request
that updates the file and the page together.
The objectives
| Objective | Measures | Budget |
|---|---|---|
api_p95 |
rest.api_ms p95 |
≤ 500 ms |
first_token_p95 |
chat.first_token_ms p95 |
≤ 2000 ms |
answer_p95 |
chat.complete_ms p95 |
≤ 15000 ms |
tool_call_p95 |
chat.tool_call_ms p95 |
≤ 3000 ms |
queue_p95 |
queue.wait_ms p95 |
≤ 2500 ms |
db_p95 |
dep.db_ms p95 |
≤ 100 ms |
cache_p95 |
dep.cache_ms p95 |
≤ 50 ms |
error_rate |
turn.error_pct |
≤ 1 % bad events |
ws_handshake |
ws.unexpected_disconnect_pct |
≤ 1 % |
provider_error_rate |
llm.provider_error_pct |
≤ 2 % |
Cost objectives: cost per conversation ≤ USD 0.010 mean (1-day rolling);
cost per tenant per day ≤ USD 10.00 hard quota, alert at 80 %. Measurement
windows are 30 days; the budget is derived (1 − target for rate objectives,
threshold_ms for latency objectives) and never duplicated by hand.
Burn-rate alerts
| Burn window | Threshold | Severity |
|---|---|---|
| 1 h | ≥ 14.4× budget | SEV1 — page |
| 6 h | ≥ 6× budget | SEV2 — page in business hours |
| 3 d | ≥ 1× budget | SEV3 — ticket |
A “no data” SLO panel is itself an alert: the dashboard reads the same database the product uses, so an empty panel usually means the database, the ops middleware or a migration is broken. Treat it as SEV2 until proven otherwise.
Ownership
| Scope | Owner | Backup |
|---|---|---|
| Platform (API, WebSocket, queues) | platform-oncall |
platform-backup |
| LLM providers and model routing | ai-oncall |
platform-oncall |
| Drive / storage (OtterIO) | storage-oncall |
platform-oncall |
| Chat and WhatsApp channels | channels-oncall |
platform-oncall |
The rotation is recorded in ops/slo.yaml (owner:), so the dashboard header
and the alert routing always agree.
Other panels in the same view
| Panel | Endpoint | Answers |
|---|---|---|
| Traffic | GET /api/ui/analytics/ops/traffic?window=<min> |
turns, sessions, WebSocket upgrades, active bots/tenants, deploy markers |
| Requests by endpoint class | GET /api/ui/analytics/ops/endpoints?window=<min> |
request rate, 5xx rate, p95, traffic share per class |
| Queue depth | GET /api/ui/analytics/ops/queue?window=<min> |
depth, running, dead letters, wait p95 per queue |
| LLM cost & tokens | GET /api/ui/analytics/ops/cost?window=<min> |
tokens, spend, cost per conversation, spend per tenant, quota burn |
Every panel is empty-but-honest when its source has no rows: the UI prints “no data” instead of a fabricated series. Host-level monitoring (CPU, memory, disk, process health) stays in the Monitoring app — Analytics owns service levels, Monitoring owns the host.