Back to guidesGuide

Enrich Prometheus metrics with info() without triggering cardinality spikes

Use useful metadata in PromQL and recording rules without pushing volatile labels into the hot path.

A practical guide to testing Prometheus’ experimental info() function, building a metadata allowlist, measuring series impact, and proving alerts and SLOs still work.

Created: June 22, 2026

Published: June 22, 2026

Estimated time40 min
LevelIntermediate
Before you startPrometheus 3.x or a test environment where info() is available/enabled.
PlatformsLinux / Docker
WhatsAppXLinkedIn

Docker

Run a staging Prometheus with mounted rules and compare cardinality before and after enrichment.

docker composepromtool or prom/prometheus image
Run promtool from a container
docker run --rm -v "$PWD:/work" -w /work prom/prometheus promtool check rules rules/metadata-enrichment.yml

Content locked

This guide requires both steps before full content is available.

  • Click “Like” on this guide.
  • Share on WhatsApp, X, LinkedIn, or copy the link.

Access is automatically unlocked as soon as both steps are completed.