Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmetric_relabel_configs does not drop __-prefixed labels as documented #5092
Comments
hoffie
changed the title
metric_relabel_configs does not drop __-prefixed metrics as documented
metric_relabel_configs does not drop __-prefixed labels as documented
Jan 13, 2019
This comment has been minimized.
This comment has been minimized.
|
That logic only applies to target relabelling, the latest docs clarify this. |
This comment has been minimized.
This comment has been minimized.
I'm afraid I don't fully understand -- I did not find a clarification in the live docs or the Git repo. Can someone clarify? I'm happy to send a pull request. |
This comment has been minimized.
This comment has been minimized.
|
It's there: 2e725a1#diff-7878dab1819673d180662f2d2ff34a22 |
This comment has been minimized.
This comment has been minimized.
|
The documentation website will get the update once prometheus/docs#1273 is merged. @hoffie hope you don't mind if I close this issue now. |
hoffie commentedJan 13, 2019
Bug Report
What did you do?
When using a two-step relabeling in metric_relabel_configs, it may be necessary to use temporary labels for storing state. The docs suggest using the
__-prefix (or even__tmpprefix) for such temporary labels and states that such labels will be removed after completing relabeling:This does not seem to be the case.
What did you expect to see?
The relabeled metric should not contain a __tmp_foo label.
What did you see instead? Under which circumstances?
The relabeled metric still contains the __tmp_foo label:
Environment
This behavior can be worked around by another metric relabeling step, but I think this is an actual bug in Prometheus (or at least a documentation bug, if the cited sentence is supposed to be restricted to relabel_configs).