Skip to content

mergermarket/node-connect-datadog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-connect-datadog

Datadog middleware for Connect JS / Express

Usage

Add middleware immediately before your router.

app.use(require("@mergermarket/connect-datadog")({}));
app.use(app.router);

Options

All options are optional.

  • dogstatsd node-dogstatsd client. default = new (require("hot-shot")).StatsD()
  • stat string name for the stat. default = "node.express.router"
  • tags either:
    • array of tags to be added to the histogram
    • function that takes req and res, returning an array of tags
    • default = []
  • route_tag: function (req, res) => string - generates route tag value if set
  • path boolean include path tag. default = false
  • method boolean include http method tag. default = false
  • protocol boolean include protocol tag. default = false
  • response_code boolean include http response codes. default = false
  • response_code_grouped boolean include http response codes grouped by 100, e.g. 5xx. default = false
  • response_code_tag boolean include http response codes as tags. default = false

License

View the LICENSE file.

About

Datadog middleware for Connect JS / Express

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 70.0%
  • Shell 20.4%
  • Dockerfile 9.6%