Commit ff40a95
feat(observability): histogram buckets for ttft/tpot so they render as histograms
`smg_router_ttft_seconds` and `smg_router_tpot_seconds` are recorded via
`histogram!()`, but the Prometheus exporter only renders a metric with
`_bucket` series when buckets are registered for it. Buckets were registered
only for the `duration_seconds` suffix (and the canary), so TTFT and TPOT fell
back to summaries (quantile lines) — not heatmap-able in Grafana.
Register the existing request-latency buckets for the `ttft_seconds` and
`tpot_seconds` suffixes too. They span 0.001-7200s, fine for both
sub-second-to-seconds TTFT and tens-of-ms per-request mean TPOT. No new buckets
config, no behavior change to recording sites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5193c12 commit ff40a95
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
365 | 377 | | |
366 | 378 | | |
367 | 379 | | |
| |||
0 commit comments