0.7.0 • Published 3 years ago
koa-datadog v0.7.0
koa-datadog
Datadog middleware for Koa
This is a fork of node-connect-datadog with modifications for Koa.
Usage
Add middleware immediately before your router.
import koaDatadog from 'koa-datadog';
import Koa from 'koa';
const app = new Koa();
app.use(koaDatadog({}));Options
All options are optional.
dogstatsdhot-shots client.default = new require("hot-shots")()statstring name for the stat.default = "node.express.router"tagsarray of tags to be added to the histogram.default = []routeboolean include route tag (koa-route and koa-router are supported).default = false.pathboolean include path tag.default = falsemethodboolean include http method tag.default = falseprotocolboolean include protocol tag.default = falseresponse_codeboolean include http response codes.default = falsedelimstring char to replace pipe char with in the routedefault = '-'
License
View the LICENSE file.