connect-datadog
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -22,6 +22,16 @@ var DD = require("node-dogstatsd").StatsD; | ||
datadog.histogram(stat, (new Date() - req._startTime), 1, [ | ||
var statTags = [ | ||
"route:" + req.route.path, | ||
"path:" + req.path | ||
].concat(tags)); | ||
].concat(tags); | ||
if (options.method) { | ||
statTags.push("method:" + req.method.toLowerCase()); | ||
} | ||
if (options.protocol && req.protocol) { | ||
statTags.push("protocol:" + req.protocol); | ||
} | ||
datadog.histogram(stat, (new Date() - req._startTime), 1, statTags); | ||
}; | ||
@@ -28,0 +38,0 @@ |
{ | ||
"name": "connect-datadog", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Datadog middleware for Connect JS / Express", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,2 +20,4 @@ # node-connect-datadog | ||
* `tags` *array* of tags to be added to the histogram. `default = []` | ||
* `method` *boolean* include http method tag. `default = false` | ||
* `protocol` *boolean* include protocol tag. `default = false` | ||
@@ -22,0 +24,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3116
32
28