From befb48a20fdb381471c2fa8b93d28f3819a5d4e0 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 7 May 2014 11:08:46 +0100 Subject: [PATCH] Use correct key in Metrics.timing --- libraries/metrics/metrics.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/metrics/metrics.coffee b/libraries/metrics/metrics.coffee index 05aaa12d3d..5079d1cdbe 100644 --- a/libraries/metrics/metrics.coffee +++ b/libraries/metrics/metrics.coffee @@ -17,12 +17,12 @@ module.exports = statsd.increment buildKey(key), sampleRate timing: (key, timeSpan, sampleRate)-> - statsd.timing(key, timeSpan, sampleRate) + statsd.timing(buildKey(key), timeSpan, sampleRate) Timer : class constructor :(key, sampleRate = 1)-> this.start = new Date() - this.key = buildKey(key) + this.key = key this.sampleRate = sampleRate done:-> timeSpan = new Date - this.start