A dogstatsd client.
$ npm install dog-statsy
const Client = require('dog-statsy')
const http = require('http')
const stats = new Client({})
setInterval(function(){
const start = new Date
http.get('http://yahoo.com', function(err, res){
const ms = new Date - start
stats.histogram('request.duration', ms, ['request:yahoo'])
})
}, 1000)Initialize a client with the given options:
host[localhost]port[8125]prefixoptional prefix ('.' is appended)tagsarray of tags to include in every callbufferSizeoptional buffer size, if not defined, it will send the data immediatelyflushIntervaloptional, only valid when bufferSize is defined. It will flush the buffer after the interval in miliseconds (if not empty)
Send gauge value.
Send meter value.
Send set value.
Send count value.
Increment by val or 1.
Decrement by val or 1.
Send histogram value.
Return histogram delta function.
Send timer value.
Return timer delta function.
Return a trace object.
Adds a step to a trace.
Completes a trace.
MIT