From 4ddc0e6a35bd2cd9e1866698c48f42e4abc9bf6a Mon Sep 17 00:00:00 2001 From: tydhot <583125614@qq.com> Date: Wed, 26 May 2021 12:11:33 +0800 Subject: [PATCH] fix bug issue#3118 and issue#3161 --- 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 })