Namespace http request keys

This commit is contained in:
James Allen 2014-05-07 11:13:21 +01:00
parent befb48a20f
commit 873297b02e

View file

@ -9,7 +9,7 @@ module.exports.monitor = (logger) ->
end.apply(this, arguments)
responseTime = new Date() - startTime
routePath = req.route.path.toString().replace(/\//g, '_').replace(/\:/g, '').slice(1)
key = "#{routePath}.#{req.method}.#{res.statusCode}"
key = "http-requests.#{routePath}.#{req.method}.#{res.statusCode}"
Metrics.timing(key, responseTime)
logger.log