xpm-metrics-statsd
v0.0.4
Published
The Metrics module for logging (node.js > 4.*). Uses [statsD](https://www.npmjs.com/package/statsd-client)
Downloads
7
Readme
Metrics module for StatsD
The Metrics module for logging (node.js > 4.*). Uses statsD
For example log response time from Google
const Metrics = require('xpm-metrics-statsd');
const metrics = new Metrics({
host: 'example.host',
port: 8124,
debug: true
});
const request = require('request-promise');
const params = {
uri: 'https://www.google.com',
resolveWithFullResponse: true,
time: true
};
request(params)
.then((res) => metrics.logTime('google_response', res.elapsedTime, 'test'));