diff --git a/lib/index.js b/lib/index.js index dd47dbf..3c4fbeb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -45,7 +45,8 @@ module.exports = function (options) { datadog.increment(stat + '.response_code.all' , 1, statTags); } - datadog.histogram(stat + '.response_time', (new Date() - req._startTime), 1, statTags); + var durationInSeconds = (new Date() - req._startTime) / 1000; + datadog.histogram(stat + '.response_time', durationInSeconds, 1, statTags); }; next();