replace - with _

This commit is contained in:
Henry Oswald 2018-11-21 08:57:00 +00:00
parent cf920a86f7
commit c36e3d74b5

View file

@ -57,7 +57,7 @@ module.exports = Metrics =
timing: (key, timeSpan, sampleRate)->
statsd.timing(buildKey(key), timeSpan, sampleRate)
if !promMetrics[key]
k = "#{name}_timer_#{key}".replace(/\./g,"_")
k = "#{name}_timer_#{key}".replace(/\./g,"_").replace(/-/g,"_")
console.log("sending timing", k)
promMetrics[key] = new prom.Summary({
name: k,