Component(s)
prometheus.scrape
Background
Today, relabeling can statically keep or drop samples based on labels, but it cannot rate-limit samples by label value.
Our use case is an Alloy deployment that scrapes metrics from multiple products. A single noisy product can affect metric ingestion for other products. We’d like to apply independent rate limits using a label such as product or namespace.
Proposal
A new rate limit component prometheus.limit, taking inspiration from the loki.process's stage.limit configurations.
prometheus.limit "metrics" {
forward_to = [prometheus.remote_write.mimir.receiver]
rate = 1000
burst = 2000
drop = true
by_label_name = "namespace"
max_distinct_labels = 10000
}
Will put out a PR if the proposal is considered!
AI disclosure
Tip
React with 👍 if this issue is important to you.
Component(s)
prometheus.scrape
Background
Today, relabeling can statically keep or drop samples based on labels, but it cannot rate-limit samples by label value.
Our use case is an Alloy deployment that scrapes metrics from multiple products. A single noisy product can affect metric ingestion for other products. We’d like to apply independent rate limits using a label such as
productornamespace.Proposal
A new rate limit component
prometheus.limit, taking inspiration from theloki.process'sstage.limitconfigurations.Will put out a PR if the proposal is considered!
AI disclosure
Tip
React with 👍 if this issue is important to you.