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{