Skip to content
node.js client for Etsy'd StatsD server
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A node.js client for Etsy's StatsD server.

This client will let you fire stats at your StatsD server from a node.js application.

% npm install node-statsd
% node
> var StatsD = require('node-statsd').StatsD
> c = new StatsD('',8125)
{ host: '', port: 8125 }
> c.increment('')
> c.decrement('')
> c.timing('node_test.some_service.task.time', 500) // time in millis


node-statsd is licensed under the MIT license.


node-statsd should run on modern nodes, and will soon be tested on 0.8 and 0.6.

Build Status

Error handling policy

  • exceptions "bubble up" into the app that uses this library
  • we don't log or print to console any errors ourself, it's the toplevel app that decides how to log/write to console.
  • we document which exceptions can be raised, and where. (TODO,

in your main app, you can leverage the fact that you have access to c.socket and do something like: (this is the best way I've found so far)

c.socket.on('error', function (exception) {
   return console.log ("error event in socket.send(): " + exception);
Something went wrong with that request. Please try again.