metric 키 계산 수정

This commit is contained in:
2023-11-28 01:48:10 +09:00
parent 9fba5d239d
commit d33fada0a1

View File

@ -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{