You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently if you define const labels and then accidentally add a label with one of the names of the const labels it will get added twice without any errors.
End result is that using my metric yields an entry such as
# HELP my_metric A basic metric
# TYPE my_metric counter
my_metric{label_1="some_value",label_2="other_value","label_2"="other_value",label_3="foobar"} 1
Expected behavior
Creating the metric with a label that is already defined by the const labels should return an error instead of including it twice in the output.
Additional context
I mean, this is certainly user error, but since the scraper seems to handle it by just ignoring the metrics with duplicate labels it took a while to debug and I definitely would have expected an error.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently if you define const labels and then accidentally add a label with one of the names of the const labels it will get added twice without any errors.
To Reproduce
Steps to reproduce the behavior:
End result is that using my metric yields an entry such as
Expected behavior
Creating the metric with a label that is already defined by the const labels should return an error instead of including it twice in the output.
Additional context
I mean, this is certainly user error, but since the scraper seems to handle it by just ignoring the metrics with duplicate labels it took a while to debug and I definitely would have expected an error.
The text was updated successfully, but these errors were encountered: