Interview Prep/SRE & Reliability/Prometheus SLIs & Recording Rules

In Thanos, the request counts used for error-budget events are exactly double what the app logs show.

AdvancedTroubleshootingPrometheus SLIs & Recording Rules
Answer

Likely causes → Two Prometheus HA replicas scrape the same targets, and the query runs without deduplication, so sum() counts each series twice. Ratios look right (both sides doubled), but absolute budget numbers are wrong.

Diagnose →

count by (prometheus_replica) (http_requests_total{job="checkout"})

Fix → Enable deduplication in Thanos Query with --query.replica-label=prometheus_replica (and the dedup toggle in Grafana's data source), or aggregate max by replica before summing.

Prevent → Configure the replica label consistently and verify event counts against a second source when building SLO reports.

All SRE & Reliability questions Roadmap: SRE & incident response

More on Prometheus SLIs & Recording Rules