New Package Monster

    @bufferapp/connect-datadog

    0.2.1 • Public • Published

    node-connect-datadog

    Datadog middleware for Connect JS / Express

    Usage

    npm install @bufferapp/connect-datadog -S
    

    Add middleware immediately before your router.

    const connectDatadog = require("connect-datadog")
    app.use(connectDatadog({}))
    app.use(app.router)

    StatsD Client Arguments

    You can also pass arguments to the StatsD Client after your options:

    connectDatadog()
    app.use(connectDatadog({
      tags: ['some:tag']
    }, 'some.hostname', 8125))

    Options

    All options are optional.

    • dogstatsd node-dogstatsd client. default = new (require("node-dogstatsd")).StatsD()
    • stat string name for the stat. default = "buffer.server"
    • tags array of tags to be added to the histogram. default = []
    • sampleRate number sends only a sample of data to StatsD default: 1
    • 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
    • statsCallback function callback hook that provides the following params
    (datadog, stat, sampleRate, statTags, req, res) => {
      // increment coolthing
      datadog.increment(`${stat}.coolthing`, sampleRate, statTags);
    }

    License

    View the LICENSE file.

    Install

    npm i @bufferapp/connect-datadog

    DownloadsWeekly Downloads

    20

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • egomezd
    • cheahenry
    • jacobchadwell
    • boristroja
    • philippemiguet
    • josemdev
    • msanroman
    • daisymarie128
    • hamstu
    • stevenc81
    • bufferbot
    • albennett
    • mayauribe
    • ssvmvss
    • gomezjuliana
    • esclapes
    • ay8s
    • mickmahady
    • dinostheo
    • hitherejoe
    • dace
    • erickhun
    • kmbriseno
    • hackertronix
    • kiriappeee
    • ethaneisenhard
    • cmunozgar
    • gtangbuffer
    • heatheryou
    • peteremilbuffer
    • arekpn
    • abeeb
    • buffermw
    • gisete