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
.