NOTE: This package is deprecated. hot-shots should support UDS going forward.
A StatsD client forked from https://github.com/brightcove/hot-shots with additional support for POSIX-compliant systems.
const StatsD = require('hot-shots-posix');
// Create the client
const client = new StatsD({
path: '/path/to/uds',
protocol: 'unix_dgram',
errorHandler: (err) => {
console.error(err);
}
});
// Start emitting metrics.
client.increment('my.stat');
client.decrement('my.stat');
- Node.js >= 6.0.0
To bootstrap your development environment:
- Clone hot-shots-posix
- Run
npm install
npm run test
- runs all testsnpm run test-unit
- runs unit testsnpm run test-integration
- runs integration testsnpm run lint
- runs linter
hot-shots-posix is licensed under the MIT license.