mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape: add missing label sorting for autogenerated metrics
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/592
This commit is contained in:
parent
1cd01b5359
commit
586c5be404
1 changed files with 1 additions and 0 deletions
|
@ -248,6 +248,7 @@ func (sw *scrapeWork) addRowToTimeseries(r *parser.Row, timestamp int64, needRel
|
||||||
sw.labels = promrelabel.ApplyRelabelConfigs(sw.labels, labelsLen, sw.Config.MetricRelabelConfigs, true)
|
sw.labels = promrelabel.ApplyRelabelConfigs(sw.labels, labelsLen, sw.Config.MetricRelabelConfigs, true)
|
||||||
} else {
|
} else {
|
||||||
sw.labels = promrelabel.FinalizeLabels(sw.labels[:labelsLen], sw.labels[labelsLen:])
|
sw.labels = promrelabel.FinalizeLabels(sw.labels[:labelsLen], sw.labels[labelsLen:])
|
||||||
|
promrelabel.SortLabels(sw.labels[labelsLen:])
|
||||||
}
|
}
|
||||||
if len(sw.labels) == labelsLen {
|
if len(sw.labels) == labelsLen {
|
||||||
// Skip row without labels.
|
// Skip row without labels.
|
||||||
|
|
Loading…
Reference in a new issue