Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
node.js client for extended StatsD server of Datadog.
branch: master

This branch is 37 commits ahead, 54 commits behind sivy:master

Merge pull request #10 from gregbacchus/master

latest commit c67879d3e0
@joybro authored
Failed to load latest commit information.
lib added increment by
.gitignore ignore node_modules
.travis.yml travis-ci integration
LICENSE add license updated read me
package.json Bump up version to 0.0.6


A node.js client for extended StatsD server of Datadog.

Datadog added new some features(histogram and tags) to their own StatsD implementation. This client is an extension of general StatsD client to work with that server.

Most parts of codes came from Steve Ivy's node-statsd. I just added few lines to support datadog's histogram and tags features.

The name of the package is changed because this isn't really statsd client and should be able to be used with original statsd client.

% npm install node-dogstatsd
% node
> var StatsD = require('node-dogstatsd').StatsD
> c = new StatsD('',8125)
{ host: '', port: 8125 }
> c.increment('')
> c.incrementBy('', 7)
> c.decrement('')
> c.decrementBy('', 12)
> c.timing('node_test.some_service.task.time', 500) // time in millis
> c.histogram('', 100) // works only with datadog' StatsD
> c.increment('', 1, ['tag:one']) // works only with datadog' StatsD


node-statsd is licensed under the MIT license.

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.