Observability

Prometheus High Cardinality Guide

Find and reduce high-cardinality Prometheus metrics caused by unbounded labels, identifiers and accidental dimensions. Last updated September 17, 2026.

Find and reduce high-cardinality Prometheus metrics caused by unbounded labels, identifiers and accidental dimensions. This reference is written for developers who need practical validation behavior, reviewable rules and safe examples rather than copied snippets with no explanation.

Recommended workflow

StepWhy it matters
Measure series growthIdentify when active series and memory use changed.
Rank label valuesLook for user IDs, request IDs, raw URLs and error messages in labels.
Fix instrumentationReplace unbounded labels with routes, classes or controlled buckets.
Verify after rolloutConfirm new series growth slows while useful aggregation remains.

Starter snippet

series growth -> metric family -> label cardinality -> source instrumentation -> bounded replacement

Review checks

Common mistakes

Validation should help users correct input while protecting systems from bad data. Keep syntax checks, product policy, security review and deliverability checks separate.

Related Formalint references

Continue with Structured Logging Guide, Error Budget Slo Guide, Uptime Monitoring Checklist.