Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-datadog

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-datadog - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

10

lib/index.js

@@ -7,2 +7,3 @@ var DD = require("node-dogstatsd").StatsD;

var tags = options.tags || [];
var response_code = options.response_code || false;

@@ -31,2 +32,3 @@ return function (req, res, next) {

if (options.protocol && req.protocol) {

@@ -40,3 +42,9 @@ statTags.push("protocol:" + req.protocol);

datadog.histogram(stat, (new Date() - req._startTime), 1, statTags);
if (response_code) {
statTags.push("response_code:" + res.statusCode);
datadog.increment(stat + '.response_code.' + res.statusCode , 1, statTags);
datadog.increment(stat + '.response_code.all' , 1, statTags);
}
datadog.histogram(stat + '.response_time', (new Date() - req._startTime), 1, statTags);
};

@@ -43,0 +51,0 @@

4

package.json
{
"name": "connect-datadog",
"version": "0.0.3",
"version": "0.0.4",
"description": "Datadog middleware for Connect JS / Express",

@@ -18,4 +18,4 @@ "main": "index.js",

"dependencies": {
"node-dogstatsd": "0.0.4"
"node-dogstatsd": "0.0.5"
}
}

@@ -23,2 +23,3 @@ # node-connect-datadog

* `protocol` *boolean* include protocol tag. `default = false`
* `response_code` *boolean* include http response codes. `default = false`

@@ -25,0 +26,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc