oto_ingest_duration_seconds
| Type | histogram |
| Labels | outcome — accepted, duplicate, unavailable, undecodable, unknown_source |
| Registered in | internal/ingestion/service/metrics.go |
| Alertable | yes |
| Rule | OtoIngestLatencyBudget in deploy/prometheus/oto-rules.yaml |
What it observes
Section titled “What it observes”The webhook accept path end to end: decode, validate, commit, enqueue, answer. It stops when oto
answers, not when the batch is processed — that is
oto_ingest_process_duration_seconds.
p99 budget is 250 ms. The hard ceiling is 5 s, because Alertmanager’s retry floor is 10 s: an accept slower than that is competing with the upstream’s own retry.
What a breach means
Section titled “What a breach means”The 202 is oto’s promise that a batch is durable. Making the upstream wait for it costs the
upstream a connection and, past a few seconds, its patience — which shows up as duplicate
deliveries (oto_ingest_duplicate_total) and then as gaps.
Read the outcome label before anything else:
acceptedslow → the commit is slow. A database problem.unavailableslow → you are queueing before shedding; seeoto_ingest_shed_total.undecodableslow → a huge body being parsed and refused. Checkbody_too_largeonoto_ingest_rejected_total.
What to check
Section titled “What to check”GET /readyz→pools, for ingest-pool saturation.- Postgres slow-query log (
log_min_duration_statement), and lock waits oningest_batches/alerts. - Batch size:
rate(oto_ingest_alerts_total) / rate(oto_ingest_accepted_total). Agroup_bychange upstream can multiply batch size overnight. - Whether the maintenance queue is doing DDL —
partitions.manageis DDL-adjacent.
What to do
Section titled “What to do”- Database-bound: give the ingest pool more connections, or the database more of whatever it is short of. The two-pool split exists so this cannot be starved by the UI.
- Batch-bound:
MaxAlertsPerBatchtruncation is preferable to unbounded accept latency; seedocs/setup/tuning.md. - If you cannot fix it quickly, shedding earlier is better than accepting slowly. A 503 is retried; a timeout is a lost notification.