lib/clients/statsd.js
function StatsdClient(opts) {
  BaseClient.apply(this, arguments);
  opts = opts || {};
  this.host = opts.host || '127.0.0.1';
  this.port = opts.port || 8125;
  this.keyBuilder = opts.keyBuilder || defaultMetricsKeyBuilder;
  this.socket = dgram.createSocket('udp4');
}
function StatsdClient(opts) {
  BaseClient.apply(this, arguments);
  opts = opts || {};
  this.host = opts.host || '127.0.0.1';
  this.port = opts.port || 8125;
  this.keyBuilder = opts.keyBuilder || defaultMetricsKeyBuilder;
  this.socket = dgram.createSocket('udp4');
}
function StatsdClient ( opts ) { BaseClient . apply ( this , arguments ) ; opts = opts || { } ; this . host = opts . host || '127.0.0.1' ; this . port = opts . port || 8125 ; this . keyBuilder = opts . keyBuilder || defaultMetricsKeyBuilder ; this . socket = dgram . createSocket ( 'udp4' ) ; }
A client that can send metrics data to a statsd backend
@param {Object} opts options about the statsd backend
@param {String} opts.host the host of the statsd server. Default is 127.0.0.1.
@param {Number} opts.port the port of the statsd server. Default is 8125.
@param {Function} opts.keyBuilder a function that will be used to format the meta data of a metric into a single key value. The signature of function is like this: function(key, tags, fieldName)
A client that can send metrics data to a statsd backend