Back to guidesGuide

Limit OpenTelemetry metric cardinality before Prometheus remote_write melts

How to cut explosive labels in SDKs, the Collector, and Prometheus without breaking useful dashboards or alerts.

A practical guide to detecting and limiting OpenTelemetry metric cardinality with canaries, PromQL, attribute limits, SDK views, and remote_write validation.

Created: August 16, 2026

Published: August 16, 2026

Estimated time45 min
LevelAdvanced
Before you startRead access to Prometheus or Grafana for TSDB, active series, and remote_write
PlatformsLinux / Docker
WhatsAppXLinkedIn

Linux

Diagnosis and canary workflow from a Linux workstation with curl, promtool, and access to Prometheus/Collector.

curljqpromtoolPrometheus accessCollector metrics access
Inspect TSDB cardinality
curl -s 'http://prometheus:9090/api/v1/status/tsdb' | jq '.data.seriesCountByMetricName[:10], .data.labelValueCountByLabelName[:10]'
Measure remote_write queue
curl -s 'http://prometheus:9090/api/v1/query?query=prometheus_remote_storage_samples_pending' | jq '.data.result'
Validate rules
promtool check rules alerts/*.yaml recording-rules/*.yaml

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.