This utility library implements our standard statsd configuration
Requirements
Minimum Node.js version: 4
## Installation
npm install --save chpr-metrics
Configuration
- METRICS_HOST
- METRICS_PORT
- METRICS_PREFIX (prepended to all metrics name)
- METRICS_SUFFIX (appended to all metrics name)
- METRICS_CACHE_DNS (set to "true" to activate caching, any other values disables dns caching)
Use
'use strict';
const metrics = require('chpr-metrics');
metrics.timing('response_time', 42);
metrics.increment('my_counter');
The exported object is the configured statds client: see https://github.com/sivy/node-statsd