Skip to content

Commit b6b274e

Browse files
authored
metrics fix: edit mutate key to replace - with _ (#1217)
1 parent d3873f4 commit b6b274e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

metrics/prometheus/collector.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,7 @@ func (c *collector) writeSummaryPercentile(name, p string, value interface{}) {
126126
}
127127

128128
func mutateKey(key string) string {
129-
return strings.Replace(key, "/", "_", -1)
129+
key = strings.Replace(key, "/", "_", -1)
130+
key = strings.Replace(key, "-", "_", -1)
131+
return key
130132
}

0 commit comments

Comments
 (0)