From 0e0304c0de3e404381eb41dca4599a942071c69d Mon Sep 17 00:00:00 2001 From: YuDong Tang <583125614@qq.com> Date: Wed, 26 May 2021 23:39:00 +0800 Subject: [PATCH] fix bug issue#3118 and issue#3161 (#3310) --- exporter/prometheusexporter/accumulator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter/prometheusexporter/accumulator.go b/exporter/prometheusexporter/accumulator.go index d2af0dd635c..3652d05f374 100644 --- a/exporter/prometheusexporter/accumulator.go +++ b/exporter/prometheusexporter/accumulator.go @@ -376,7 +376,7 @@ func timeseriesSignature(ilmName string, metric pdata.Metric, labels pdata.Strin b.WriteString(metric.DataType().String()) b.WriteString("*" + ilmName) b.WriteString("*" + metric.Name()) - labels.Range(func(k string, v string) bool { + labels.Sort().Range(func(k string, v string) bool { b.WriteString("*" + k + "*" + v) return true })