prometheus/prometheus

Add cardinality_limit to scrape config

Open

#11,061 opened on Jul 25, 2022

View on GitHub
 (15 comments) (0 reactions) (0 assignees)Go (10,408 forks)batch import
component/configcomponent/scrapinghelp wantedkind/featurepriority/P3

Repository metrics

Stars
 (64,042 stars)
PR merge metrics
 (Avg merge 11d 5h) (118 merged PRs in 30d)

Description

Proposal

In order to stop targets from overloading label values and also the metric __name__ index, add a scrape config limiter that limits the number of unique label values per scrape.

This will protect, for example:

  • When other metric systems are translated to Prometheus incorrectly and tag values become part of the metric name.
  • When a piece of data is not filtered and exposed as thousands of label values.

Contributor guide