prometheus icon indicating copy to clipboard operation
prometheus copied to clipboard

Add metric_names_limit to scrape config

Open SuperQ opened this issue 1 year ago • 3 comments

Proposal

In order to stop targets from overloading the __name__ index, add a scrape config limiter that limits the number of metric names 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.

SuperQ avatar Jul 25 '22 19:07 SuperQ

Should we enable that setting for any label name?

roidelapluie avatar Jul 26 '22 08:07 roidelapluie

That's not a bad idea. Would we want one setting for metric names and one for label values?

label_cardinality_limit

SuperQ avatar Jul 28 '22 13:07 SuperQ

The metric name is a label value.

roidelapluie avatar Sep 05 '22 12:09 roidelapluie