common
common copied to clipboard
LabelSet.String sorts incorrectly
This code: https://github.com/prometheus/common/blob/1d8c67263f0058f5eda479684dec5751eaa1468b/model/labelset.go#L135-L138
will sort foo2="bar" before foo="bar".
The usual sort order of Prometheus labels is alphabetical by names, which would put foo before foo2.
@bboreham , I would like to work in this issue. Can you please assign this to me?
Sure, thanks for your interest. It would be good to have a small benchmark, to check that your changes run at about the same speed.