bugfix: handle labels

This commit is contained in:
Ulric Qin 2022-07-26 16:15:55 +08:00
parent cba82cace6
commit 1cd3658793
1 changed files with 6 additions and 0 deletions

View File

@ -27,5 +27,11 @@ func NewSample(prefix, metric string, value interface{}, labels ...map[string]st
s.Metric = metricReplacer.Replace(s.Metric)
}
for i := 0; i < len(labels); i++ {
for k, v := range labels[i] {
s.Labels[k] = v
}
}
return s
}