Add test for honor_labels configuration for Prometheus Receiver #5995
Labels
ci-cd
CI, CD, testing, build issues
comp:prometheus
Prometheus related issues
comp: receiver
Receiver
Is your feature request related to a problem? Please describe.
We want to ensure that the Prometheus receiver handles label conflicts based on the honor_labels value set in the scrape config.
Describe the solution you'd like
We propose the following solution:
To test if the Prometheus receiver handles honor labels configuration, we can configure the receiver to scrape data with existing job and instance labels and validate the output from the receiver.
For the first test case, we set
honor_labels : true
.Expected Result: Here we expect the Prometheus receiver to resolve label conflicts for the job and instance labels by keeping the values from the scraped data.
For the second test case, we set
honor_labels : false
.Expected Result: In this case we expect the receiver to rename the conflicting job and instance labels from the scraped data to “exported_instance”=<original_value> and “exported_job”=<original_value>".
Test data with existing job and instance labels:
Describe alternatives you've considered
N/A
Additional context
Related to : open-telemetry/wg-prometheus#57
CC: @alolita @Aneurysm9
The text was updated successfully, but these errors were encountered: