Interview Prep/Monitoring & Observability/Prometheus storage, memory and cardinality

Histogram metrics alone account for 60% of all series

AdvancedTroubleshootingPrometheus storage, memory and cardinality
Answer

Likely causes → Classic histograms with many buckets (×labels). 20 buckets × 50 routes × 10 status codes × 30 pods = 300k series for one metric.

Diagnose →

topk(10, count by (__name__)({__name__=~".+_bucket"}))

Fix → Cut buckets to what your SLOs need, drop the le buckets you never query, remove status from histograms (keep it on counters), or migrate to native histograms (--enable-feature=native-histograms, one series per histogram).

Prevent → Standard bucket presets in a shared instrumentation library.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus storage, memory and cardinality