-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Hi, I'd like to propose a feature to disable overwriting labels of metric by the specified labels
of server group.
The reason for this is I use it as an alternative to external_labels
of Prometheus. BUT those do not overwrite the label if metrics already has it.
Off course, I don't expect the behavior as is to change, that would be a breaking change, instead I'm thinking about adding some option like labels_do_not_overwrite: <bool>
with default to false
The particular code is here if I'm not mistaken, where it should be sufficient to check if the label is there and if so to continue
promxy/pkg/promhttputil/merge.go
Line 47 in a956fcb
func ValueAddLabelSet(a model.Value, l model.LabelSet) error { |
I'd be happy to send a PR if we agree on the implementation.
Thanks for consideration in advance!
Also for the project at all :)