Interview Prep/Monitoring & Observability/Cardinality Control & Cost

How do histograms affect cardinality, and how do you control it?

IntermediateProductionCardinality Control & Cost
Answer

A classic histogram creates one series per bucket plus _sum and _count, multiplied by every label combination. 20 buckets × 50 routes × 5 codes × 100 pods = 500,000 series for one metric. Controls:

  • Fewer, well-chosen buckets around the SLO thresholds.
  • Drop pod from the histogram (aggregate with a recording rule, then drop raw).
  • Native histograms (sparse, one series per label set).
  • Do not put code on the histogram if a separate counter already has it.
All Monitoring & Observability questions

More on Cardinality Control & Cost