statsd-client-cached
v1.0.1
Published
A caching version of statsd-client
Downloads
1
Readme
statsd-client-cached
This is a wrapper for statsd-client, which aggregates values and changes for a specific interval and sends them to statsd only (at most) once every interval.
Usage
It is initialized and used exaclty like statsd-client
, with an additional flushInterval
option (default: 10).
const SDC = require('statsd-client-cached')
const sdc = new SDC({
host: 'statsd.example.com',
port: 8124,
flushInterval: 10000 // default: 10 seconds
})
Notes
Aggragation and delaying affects increments/decrements (counters) and gauges. Timers and histograms are sent immediately (as there is no aggregation for these).
License
MIT