Cloud and platform engineering

Control metric cardinality in observability platforms

Prevent metric explosion and escalating monitoring costs by limiting high-cardinality label dimensions. Including unbounded attributes like user IDs or IP addresses in Prometheus metric labels causes severe memory bloat. Cloud architecture decisions trade cost, resilience, operational skill and recovery time; validate them against service objectives rather than adopting a pattern by default.

Operational constraints and failure modes

Including unbounded attributes like user IDs or IP addresses in Prometheus metric labels causes severe memory bloat.

  • Define service objectives and recovery targets
  • Model dependency and regional failure modes
  • Measure cost and operational overhead

Implementation approach

Enforce metric naming conventions, avoid unbounded tag values, and drop high-cardinality labels at ingestion.

  • Confirm the responsible owner
  • Apply the change to a representative case
  • Document decisions and exceptions

Practical example

An observability platform drops high-cardinality request UUID labels from metrics, reducing Prometheus memory usage by 60%.

  • Reproduce the starting situation
  • Apply the described approach
  • Check the user-facing result

Verification and follow-up

Monitor monitoring system memory usage, review metric label schemas, and check time-series growth rates.

  • Test expected and failure cases
  • Compare with the recorded baseline
  • Agree the next review date and owner

Questions to keep in view

When should a team use this cloud and platform engineering guide?

Prevent metric explosion and escalating monitoring costs by limiting high-cardinality label dimensions.

What should be checked before rollout?

Monitor monitoring system memory usage, review metric label schemas, and check time-series growth rates.