0.0.4 • Published 7 years ago
xpm-metrics-statsd v0.0.4
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'));