Errors clearly appear in the logs, but the SLI shows zero 5xx for low-traffic routes.
AdvancedTroubleshootingPrometheus SLIs & Recording Rules
Answer
Likely causes → Labeled counters are created lazily: the code="500" series appears only at the first error. rate() needs at least two samples, so the first increment of a new series is invisible, and on low-traffic routes most errors are "first errors" after each pod restart.
Diagnose →
http_requests_total{job="checkout",code="500"}
Check whether the series appears only after errors and with value 1.
Fix → Pre-initialize expected label combinations at startup (for example REQS.labels(route, "500") in Python, or .WithLabelValues(...) in Go), so the series exists at 0 before any error.
Prevent → Make counter initialization part of the instrumentation library and the service template.
More on Prometheus SLIs & Recording Rules
You applied a `PrometheusRule` for your SLO, but `slo:sli_error:ratio_rate5m` returns nothing in Prometheus.Beginner`promtool check rules` fails with `could not parse expression: 1:72: parse error: unexpected right parenthesis ')'`.BeginnerThe availability SLI panel shows `NaN` every night between 02:00 and 05:00.BeginnerYour per-route SLI query fails with `found duplicate series for the match group {route="/api/checkout"} on the right hand-side of the operation`.IntermediatePrometheus logs `vector contains metrics with the same labelset after applying rule labels` for your SLI recording rule.AdvancedYour latency SLI using `le="0.3"` returns an empty result, but the histogram exists.Intermediate