Skip to content

fix(slo): align latency buckets with SLO, zero-fill 5xx ratio - #138

Merged
vovinacci merged 1 commit into
mainfrom
fix/slo-latency-bucket
Jul 12, 2026
Merged

fix(slo): align latency buckets with SLO, zero-fill 5xx ratio#138
vovinacci merged 1 commit into
mainfrom
fix/slo-latency-bucket

Conversation

@vovinacci

Copy link
Copy Markdown
Owner

Two latent rule bugs surfaced by evaluating every dashboard panel:

  • slo:latency:ratio7d filters le="0.2" but the request-latency histogram used default client buckets, which jump 0.1 -> 0.25; the series has been empty since the rule was written, taking the latency error-budget panel with it. The histogram now declares explicit buckets including the 0.2 SLO boundary.
  • slo:error_rate:actual_5xx_ratio7d produced an empty vector (panel "No data") whenever zero 5xx requests existed -- the healthy case. The numerator now falls back to vector(0), so a clean stack reads 0.

Verified live: promtool validates the rules; after rebuilding the api image all three previously empty series evaluate (5xx ratio = 0, latency ratio converging to 1.0 as the rate window fills); backend tests pass.

Two latent rule bugs surfaced by evaluating every dashboard panel:

- slo:latency:ratio7d filters le="0.2" but the request-latency
  histogram used default client buckets, which jump 0.1 -> 0.25; the
  series has been empty since the rule was written, taking the latency
  error-budget panel with it. The histogram now declares explicit
  buckets including the 0.2 SLO boundary.
- slo:error_rate:actual_5xx_ratio7d produced an empty vector (panel
  "No data") whenever zero 5xx requests existed -- the healthy case.
  The numerator now falls back to vector(0), so a clean stack reads 0.

Verified live: promtool validates the rules; after rebuilding the api
image all three previously empty series evaluate (5xx ratio = 0,
latency ratio converging to 1.0 as the rate window fills); backend
tests pass.
@vovinacci
vovinacci merged commit 406a98f into main Jul 12, 2026
6 checks passed
@vovinacci
vovinacci deleted the fix/slo-latency-bucket branch July 12, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant