A wrapper for for node-dogstatsd that buffers and rolls up metrics into efficient calls to a Datadog StatsD server.
npm install datadog-statsd-metrics-collector node-dogstatsd
const StatsD = require('node-dogstatsd').StatsD
const Collector = require('datadog-statsd-metrics-collector');
const dd = new Collector(new StatsD('example.org', 8125));
dd.increment('test.metric', 1, ['tag:first']);
- increment
- incrementBy
- decrement
- decrementBy
- histagram
Aside from the constructor all StatsD calls proxied to node-dogstatsd.
arg | type | required | default |
---|---|---|---|
client | instanceof node-dogstatsd | yes | undefined |
delayMilliseconds | number | no | 10000 |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
value | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
value | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
time | number | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
value | number | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
value | number | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |
arg | type | required | default |
---|---|---|---|
metric | string | yes | undefined |
value | number | yes | undefined |
sample_rate | number | no | 1 |
tags | array[string] | no | undefined |