[Prometheus Receiver] Add test to validate metrics renaming as per configuration #6090
Closed
2 tasks
Labels
ci-cd
CI, CD, testing, build issues
comp:prometheus
Prometheus related issues
comp: receiver
Receiver
Stale
Is your feature request related to a problem? Please describe.
In order to verify that the Prometheus receiver is functioning as expected, a new test is needed to verify that Prometheus receiver renames the metric as per
metric_relabel_configs
configuration provided inscrap_configs
of Prometheus Receiver configuration in OTEL collector configuration yaml file.Create testcases for:
relabel.Action
for replace, drop, and keep.relabel.Action
replace, drop, keep, and hashmod.Describe the solution you'd like
Prometheus Receiver should rename the metric and labels as per
metric_relabel_configs
configuration.Create testdata for Prometheus Receiver to scrape and provide renaming configuration for each
relabel.Action
in Promethues Receiver configuration . For example:Expected Behavior:
Prometheus Receiver renames the metrics as per the given configuration. To validate, assert that the metric name has been renamed. In addition, similar to metric_receiver_test.go validate the scrapes to ensure correct OTLP data transformation.
Additional context
Related to open-telemetry/wg-prometheus#57
Related Open Issues:
#5001
cc: @alolita @Aneurysm9
The text was updated successfully, but these errors were encountered: