0.0.1 • Published 11 years ago

dogstatsy v0.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
11 years ago

dogstatsy

A simple DogStatsD client.

Installation

$ npm install dogstatsy

Example

var Client = require('dogstatsy');
var http = require('http');
var stats = new Client({
  service: 'example'
});

setInterval(function(){
  stats.incr('requests', {
  	basic: 'tag'
  });
  var end = stats.timer('request');
  http.get('http://yahoo.com', function(err, res){
    // do stuff
    end({
      statusCode: res.statusCode
    });
  });
}, 1000);