Skip to content

ScrapeClass relabelings/metricRelabelings are added after target-specific relabelings #1997

@fabiobaiao

Description

@fabiobaiao

According to the prometheus-operator's ScrapeClass api reference, its relabelings and metricRelabelings are added before the target specific relabelings: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.ScrapeClass

The VictoriaMetrics operator does it the other way around. I suppose this is where it happens:

ers.RelabelConfigs = append(ers.RelabelConfigs, scrapeClass.RelabelConfigs...)
ers.MetricRelabelConfigs = append(ers.MetricRelabelConfigs, scrapeClass.MetricRelabelConfigs...)

Metadata

Metadata

Labels

bugSomething isn't workingwaiting for releaseThe change was merged to upstream, but wasn't released yet.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions