Skip to content

Bug or feature in golang client: xxx already contains grouping label yyy #972

Answered by beorn7
ascheman asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, too many discussion forums for Prometheus… (told everyone so… ;)

The behavior is deliberate. At least it is documented as such: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus/push#Pusher.Grouping

The basic idea is that grouping labels are akin to target labels and therefore should not collide with the metric’s own labels. I guess if the label value is the same, there is not really any harm done, it’s just a bit weird.

Can you perhaps just not set that label on the metric itself?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ascheman
Comment options

Answer selected by ascheman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants