koa-datadog
    TypeScript icon, indicating that this package has built-in type declarations

    0.6.3 • Public • Published

    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.

    • dogstatsd hot-shots client. default = new require("hot-shots")()
    • stat string name for the stat. default = "node.express.router"
    • tags array of tags to be added to the histogram. default = []
    • routeboolean include route tag (koa-route and koa-router are supported). default = false.
    • 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
    • delim string char to replace pipe char with in the route default = '-'

    License

    View the LICENSE file.

    Install

    npm i koa-datadog

    DownloadsWeekly Downloads

    634

    Version

    0.6.3

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    9

    Last publish

    Collaborators

    • kouhin