From d33fada0a1e2c9230db6187d249256e7f0a552de Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 28 Nov 2023 01:48:10 +0900 Subject: [PATCH] =?UTF-8?q?metric=20=ED=82=A4=20=EA=B3=84=EC=82=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metric/metric.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metric/metric.go b/metric/metric.go index be8c2bb..4c69c54 100644 --- a/metric/metric.go +++ b/metric/metric.go @@ -144,6 +144,10 @@ func init() { func newMetricImpl(mt MetricType, name string, help string, constLabels map[string]string) (writer MetricWriter) { hash := md5.New() hash.Write([]byte(name)) + for k, v := range constLabels { + hash.Write([]byte(k)) + hash.Write([]byte(v)) + } key := hex.EncodeToString(hash.Sum(nil))[:metric_key_size] temp, _ := json.Marshal(MetricDescription{