metrics: replace strings.Replace with string.ReplaceAll (#24835)

This commit is contained in:
Daniel Liu 2024-12-13 14:00:12 +08:00
parent 2e5b342826
commit d77c1e5ea3

View file

@ -116,5 +116,5 @@ func (c *collector) writeSummaryPercentile(name, p string, value interface{}) {
}
func mutateKey(key string) string {
return strings.Replace(key, "/", "_", -1)
return strings.ReplaceAll(key, "/", "_")
}