Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hot-shots

brightcove4.6mMIT10.2.1TypeScript support: included

Node.js client for StatsD, DogStatsD, and Telegraf

statsd, dogstatsd, datadog, metrics, telegraf, backend

readme

hot-shots

A Node.js client for Etsy's StatsD server, Datadog's DogStatsD server, and InfluxDB's Telegraf StatsD server.

This project was originally a fork off of node-statsd. This project includes all changes in the latest node-statsd and many additional changes, including:

  • TypeScript types
  • Telegraf support
  • events
  • child clients
  • tcp protocol support
  • uds (Unix domain socket) protocol support
  • raw stream protocol support
  • mock mode
  • asyncTimer
  • asyncDistTimer
  • much more, including many bug fixes

You can read about all changes in the changelog.

hot-shots supports Node 10.x and higher.

Build Status

Usage

All initialization parameters are optional.

Parameters (specified as one object passed into hot-shots):

  • host: The host to send stats to, if not set, the constructor tries to retrieve it from the DD_AGENT_HOST environment variable, default: 'undefined' which as per UDP/datagram socket docs results in 127.0.0.1 or ::1 being used.
  • port: The port to send stats to, if not set, the constructor tries to retrieve it from the DD_DOGSTATSD_PORT environment variable, default: 8125
  • prefix: What to prefix each stat name with default: ''. Note prefix separator must be specified explicitly if desired (e.g. my_prefix.).
  • suffix: What to suffix each stat name with default: ''. Note suffix separator must be specified explicitly if desired (e.g. .my_suffix).
  • tagPrefix: Prefix tag list with character default: '#'. Note does not work with telegraf option.
  • tagSeparator: Separate tags with character default: ','. Note does not work with telegraf option.
  • globalize: Expose this StatsD instance globally. default: false
  • cacheDns: Caches dns lookup to host for cacheDnsTtl, only used when protocol is udp, default: false
  • cacheDnsTtl: time-to-live of dns lookups in milliseconds, when cacheDns is enabled. default: 60000
  • mock: Create a mock StatsD instance, sending no stats to the server and allowing data to be read from mockBuffer. Note that mockBuffer will keep growing, so only use for testing or clear out periodically. default: false
  • globalTags: Tags that will be added to every metric. Can be either an object or list of tags. default: {}.
  • includeDataDogTags: Whether to include DataDog tags to the global tags. default: true. The following Datadog tags are appended to globalTags from the corresponding environment variable if the latter is set:
    • dd.internal.entity_id from DD_ENTITY_ID (docs)
    • env from DD_ENV (docs)
    • service from DD_SERVICE (docs)
    • version from DD_VERSION (docs)
  • maxBufferSize: If larger than 0, metrics will be buffered and only sent when the string length is greater than the size. default: 0
  • bufferFlushInterval: If buffering is in use, this is the time in ms to always flush any buffered metrics. default: 1000
  • telegraf: Use Telegraf's StatsD line protocol, which is slightly different than the rest default: false
  • sampleRate: Sends only a sample of data to StatsD for all StatsD methods. Can be overridden at the method level. default: 1
  • errorHandler: A function with one argument. It is called to handle various errors. default: none, errors are thrown/logger to console
  • useDefaultRoute: Use the default interface on a Linux system. Useful when running in containers
  • protocol: Use tcp option for TCP protocol, or uds for the Unix Domain Socket protocol or stream for the raw stream. Defaults to udp otherwise.
  • path: Used only when the protocol is uds. Defaults to /var/run/datadog/dsd.socket.
  • stream: Reference to a stream instance. Used only when the protocol is stream.
  • tcpGracefulErrorHandling: Used only when the protocol is tcp. Boolean indicating whether to handle socket errors gracefully. Defaults to true.
  • tcpGracefulRestartRateLimit: Used only when the protocol is tcp. Time (ms) between re-creating the socket. Defaults to 1000.
  • udsGracefulErrorHandling: Used only when the protocol is uds. Boolean indicating whether to handle socket errors gracefully. Defaults to true.
  • udsGracefulRestartRateLimit: Used only when the protocol is uds. Time (ms) between re-creating the socket. Defaults to 1000.
  • closingFlushInterval: Before closing, StatsD will check for inflight messages. Time (ms) between each check. Defaults to 50.
  • udpSocketOptions: Used only when the protocol is udp. Specify the options passed into dgram.createSocket(). Defaults to { type: 'udp4' }

StatsD methods

All StatsD methods other than event, close, and check have the same API:

  • name: Stat name required
  • value: Stat value required except in increment/decrement where it defaults to 1/-1 respectively
  • sampleRate: Sends only a sample of data to StatsD default: 1
  • tags: The tags to add to metrics. Can be either an object { tag: "value"} or an array of tags. default: []
  • callback: The callback to execute once the metric has been sent or buffered

If an array is specified as the name parameter each item in that array will be sent along with the specified value.

close

The close method has the following API:

  • callback: The callback to execute once close is complete. All other calls to statsd will fail once this is called.

event

The event method has the following API:

  • title: Event title required
  • text: Event description default is title
  • options: Options for the event
    • date_happened Assign a timestamp to the event default is now
    • hostname Assign a hostname to the event.
    • aggregation_key Assign an aggregation key to the event, to group it with some others.
    • priority Can be ‘normal’ or ‘low’ default: normal
    • source_type_name Assign a source type to the event.
    • alert_type Can be ‘error’, ‘warning’, ‘info’ or ‘success’ default: info
  • tags: The tags to add to metrics. Can be either an object { tag: "value"} or an array of tags. default: []
  • callback: The callback to execute once the metric has been sent.

check

The check method has the following API:

  • name: Check name required
  • status: Check status required
  • options: Options for the check
    • date_happened Assign a timestamp to the check default is now
    • hostname Assign a hostname to the check.
    • message Assign a message to the check.
  • tags: The tags to add to metrics. Can be either an object { tag: "value"} or an array of tags. default: []
  • callback: The callback to execute once the metric has been sent.
  var StatsD = require('hot-shots'),
      client = new StatsD({
          port: 8020,
          globalTags: { env: process.env.NODE_ENV },
          errorHandler: errorHandler,
      });

  // Increment: Increments a stat by a value (default is 1)
  client.increment('my_counter');

  // Decrement: Decrements a stat by a value (default is -1)
  client.decrement('my_counter');

  // Histogram: send data for histogram stat (DataDog and Telegraf only)
  client.histogram('my_histogram', 42);

  // Distribution: Tracks the statistical distribution of a set of values across your infrastructure.
  // (DataDog v6)
  client.distribution('my_distribution', 42);

  // Gauge: Gauge a stat by a specified amount
  client.gauge('my_gauge', 123.45);

  // Gauge: Gauge a stat by a specified amount, but change it rather than setting it
  client.gaugeDelta('my_gauge', -10);
  client.gaugeDelta('my_gauge', 4);

  // Set: Counts unique occurrences of a stat (alias of unique)
  client.set('my_unique', 'foobar');
  client.unique('my_unique', 'foobarbaz');

  // Event: sends the titled event (DataDog only)
  client.event('my_title', 'description');

  // Check: sends a service check (DataDog only)
  client.check('service.up', client.CHECKS.OK, { hostname: 'host-1' }, ['foo', 'bar'])

  // Incrementing multiple items
  client.increment(['these', 'are', 'different', 'stats']);

  // Incrementing with tags
  client.increment('my_counter', ['foo', 'bar']);

  // Sampling, this will sample 25% of the time the StatsD Daemon will compensate for sampling
  client.increment('my_counter', 1, 0.25);

  // Tags, this will add user-defined tags to the data
  // (DataDog and Telegraf only)
  client.histogram('my_histogram', 42, ['foo', 'bar']);

  // Using the callback.  This is the same format for the callback
  // with all non-close calls
  client.set(['foo', 'bar'], 42, function(error, bytes){
    //this only gets called once after all messages have been sent
    if(error){
      console.error('Oh noes! There was an error:', error);
    } else {
      console.log('Successfully sent', bytes, 'bytes');
    }
    });

  // Timing: sends a timing command with the specified milliseconds
  client.timing('response_time', 42);

  // Timing: also accepts a Date object of which the difference is calculated
  client.timing('response_time', new Date());

  // Timer: Returns a function that you call to record how long the first
  // parameter takes to execute (in milliseconds) and then sends that value
  // using 'client.timing'.
  // The parameters after the first one (in this case 'fn')
  // match those in 'client.timing'.
  var fn = function(a, b) { return a + b };
  client.timer(fn, 'fn_execution_time')(2, 2);

  // Async timer: Similar to timer above, but you instead pass in a function
  // that returns a Promise.  And then it returns a Promise that will record the timing.
  var fn = function () { return new Promise(function (resolve, reject) { setTimeout(resolve, n); }); };
  var instrumented = statsd.asyncTimer(fn, 'fn_execution_time');
  instrumented().then(function() {
    console.log('Code run and metric sent');
  });

  // Async timer: Similar to asyncTimer above, but it instead emits a distribution.
  var fn = function () { return new Promise(function (resolve, reject) { setTimeout(resolve, n); }); };
  var instrumented = statsd.asyncDistTimer(fn, 'fn_execution_time');
  instrumented().then(function() {
    console.log('Code run and metric sent');
  });

  // Sampling, tags and callback are optional and could be used in any combination (DataDog and Telegraf only)
  client.histogram('my_histogram', 42, 0.25); // 25% Sample Rate
  client.histogram('my_histogram', 42, { tag: 'value'}); // User-defined tag
  client.histogram('my_histogram', 42, ['tag:value']); // Tags as an array
  client.histogram('my_histogram', 42, next); // Callback
  client.histogram('my_histogram', 42, 0.25, ['tag']);
  client.histogram('my_histogram', 42, 0.25, next);
  client.histogram('my_histogram', 42, { tag: 'value'}, next);
  client.histogram('my_histogram', 42, 0.25, { tag: 'value'}, next);

  // Use a child client to add more context to the client.
  // Clients can be nested.
  var childClient = client.childClient({
    prefix: 'additionalPrefix.',
    suffix: '.additionalSuffix',
    globalTags: { globalTag1: 'forAllMetricsFromChildClient'}
  });
  childClient.increment('my_counter_with_more_tags');

  // Close statsd.  This will ensure all stats are sent and stop statsd
  // from doing anything more.
  client.close(function(err) {
    console.log('The close did not work quite right: ', err);
  });

DogStatsD and Telegraf functionality

Some of the functionality mentioned above is specific to DogStatsD or Telegraf. They will not do anything if you are using the regular statsd client.

  • globalTags parameter- DogStatsD or Telegraf
  • tags parameter- DogStatsD or Telegraf.
  • telegraf parameter- Telegraf
  • uds option in protocol parameter- DogStatsD
  • histogram method- DogStatsD or Telegraf
  • event method- DogStatsD
  • check method- DogStatsD

Errors

As usual, callbacks will have an error as their first parameter. You can have an error in both the message and close callbacks.

If the optional callback is not given, an error is thrown in some cases and a console.log message is used in others. An error will only be explicitly thrown when there is a missing callback or if it is some potential configuration issue to be fixed.

If you would like to ensure all errors are caught, specify an errorHandler in your root client. This will catch errors in socket setup, sending of messages, and closing of the socket. If you specify an errorHandler and a callback, the callback will take precedence.

// Using errorHandler
var client = new StatsD({
  errorHandler: function (error) {
    console.log("Socket errors caught here: ", error);
  }
})

Congestion error

If you get an error like Error sending hot-shots message: Error: congestion with an error code of 1, it is probably because you are sending large volumes of metrics to a single agent/ server. This error only arises when using the UDS protocol and means that packages are being dropped. Take a look at the Datadog docs for some tips on tuning your connection.

Unix domain socket support

The 'uds' option as the protocol is to support Unix Domain Sockets for Datadog. It has the following limitations:

  • It only works where 'node-gyp' works. If you don't know what this is, this is probably fine for you. If you had an troubles with libraries that you 'node-gyp' before, you will have problems here as well.
  • It does not work on Windows

The above will cause the underlying library that is used, unix-dgram, to not install properly. Given the library is listed as an optionalDependency, and how it's used in the codebase, this install failure will not cause any problems. It only means that you can't use the uds feature.

Submitting changes

Thanks for considering making any updates to this project! This project is entirely community-driven, and so your changes are important. Here are the steps to take in your fork:

  1. Run "npm install"
  2. Add your changes in your fork as well as any new tests needed
  3. Run "npm test"
  4. Update README.md with any needed documentation
  5. If you have made any API changes, update types.d.ts
  6. Push your changes and create the PR

When you've done all this we're happy to try to get this merged in right away.

Package versioning and security

Versions will attempt to follow semantic versioning, with major changes only coming in major versions.

npm publishing is possible by one person, bdeitte, who has two-factor authentication enabled for publishes. Publishes only contain one additional library, unix-dgram.

License

hot-shots is licensed under the MIT license.

changelog

CHANGELOG

10.2.1 (2024-10-19)

  • @thiago-negri Add 'includeDataDogTags' property to 'ClientOptions' type

10.2.0 (2024-10-13)

  • @thiago-negri Add option 'includeDataDogTags'
  • @bdeitte Upgrade dependencies for security warning and a few README updates

10.1.1 (2024-9-12)

  • @matteosb Handle synchronous socket.send error in sendUsingDnsCache

10.1.0 (2024-9-6)

  • @lachlankidson Add gaugeDelta function
  • @bdeitte Various dev library updates
  • @bdeitte Add Node 20 testing

10.0.0 (2023-2-3)

  • @imyourmanzi In TypeScript, narrow callback parameter types
  • @bdeitte Remove Node 8 from supported list and add testing of Node 18

9.3.0 (2022-10-23)

  • @albert-mirzoyan add stream property type to ClientOptions
  • @bdeitte Upgrade unix-dgram to support Node 18

9.2.0 (2022-7-30)

  • @hjr3 Add udpSocketOptions to control how UDP socket is created

9.1.0 (2022-6-20)

  • @zhyu Append standard Datadog tags from env vars (DD_ENTITY_ID, DD_ENV, DD_SERVICE, and DD_VERSION)
  • @bdeitte Check if client is undefined before closing to fix error
  • @bdeitte Start using GitHub Actions for tests and remove now-broken travis file
  • @bdeitte Update testing dependencies

9.0.0 (2021-10-31)

  • @cesarfd Add TCP reconnections, similar to how it's done for UDS. Enabled by default and configurable through tcpGracefulErrorHandling/tcpGracefulRestartRateLimit.
  • @sambostock Document explicit prefix/suffix separators

8.5.2 (2021-9-26)

  • @amc6 TypeScript: add missing decrement overload type

8.5.1 (2021-9-2)

  • @tim-crisp TypeScript: add stream to protocol string union type
  • @bdeitte Bump path-parse (used just in dev builds) from 1.0.6 to 1.0.7

8.5.0 (2021-7-16)

  • @maxday Add a closingFlushInterval option which allows stopping quicker

8.4.0 (2021-7-3)

  • @roim Use errorHandler when possible on UDS socket replace error

8.3.2 (2021-5-29)

  • @cmaddalozzo Close unix domain socket after unsuccessful attempts to connect

8.3.1 (2021-4-1)

  • @dvd-z Fix date_happened to allow usage of numbers

8.3.0 (2020-12-16)

  • @chotiwat Handle UDS errors occurring when sending metrics

8.2.1 (2020-12-1)

  • @stephenmathieson Make close callback optional in TypeScript definition

8.2.0 (2020-9-30)

  • @dhermes Making UDS error handling and recovery more robust. Note these look to be ok in a minor release but are signficant upgrades to how UDS works. Thanks as well to @prognant for an overlapping PR.

8.1.0 (2020-9-25)

  • @maleblond Support multiple values for the same tag key

8.0.0 (2020-9-23)

  • @naseemkullah Change default value for 'host' from 'localhost' to undefined. This means the default host will now be 127.0.0.1 or ::1, which has cases where it will speed up sending metrics. This should be a non-breaking change, but bumping to a major version for it given it's a very base change to the library.
  • @naseemkullah Switch from equals to strictEquals in tests

7.8.0 (2020-8-28)

  • @bdeitte Fix some flaky tests
  • @ralphiech Add missing error handler when socket is not created
  • @ralphiech Add missing socket checks
  • @dependabot Bump lodash from 4.17.15 to 4.17.19
  • @DerGut Add "Congestion error" section to README

7.7.1 (2020-8-4)

  • @DerGut Fix udsGracefulErrorHandling default value

7.7.0 (2020-7-29)

  • @tebriel Add asyncDistTimer function

7.6.0 (2020-6-16)

  • @Impeekay Add date type to timing function

7.5.0 (2020-6-5)

  • @benblack86 Unreference underlying socket/interval to prevent process hangs

7.4.2 (2020-5-5)

  • @kazk Fix types for set/unique

7.4.1 (2020-4-28)

  • @lbeschastny Sanitize ',' tags characters for telegraf

7.4.0 (2020-4-3)

  • @MichaelSitter add tagPrefix and tagSeparator options

7.3.0 (2020-4-1)

  • @marciopd Use Date.now() instead of new Date()
  • @chotiwat Add UDS graceful error handling options to typescript
  • @bdeitte Update packages, most notably getting node-unix-dgram 2.0.4

7.2.0 (2020-3-19)

  • @marciopd Add cacheDnsTtl
  • @dependabot Bump acorn from 6.3.0 to 6.4.1

7.1.0 (2020-3-4)

  • @wision Actually fix cachedDns with udp
  • @casey-chow TypeScript: parameterize function types in timer and asyncTimer

7.0.0 (2020-2-13)

  • @tomruggs Remove support for Node 6- now supporting Node 8.x or higher
  • @tomruggs Update to the latest mocha version to get rid of a security warning

6.8.7 (2020-2-10)

  • @mrknmc Fix TypeError when increment called without a callback argument

6.8.6 (2020-1-28)

  • @ericmustin callback is not properly passed bytes argument

6.8.5 (2019-12-19)

  • @bdeitte Fix for socket on reading when cacheDns and udp in use

6.8.4 (2019-12-18)

  • @bdeitte Fix cacheDns with udp

6.8.3 (2019-12-15)

  • @gleb-rudenko Fix StatsD constructor typing

6.8.2 (2019-11-12)

  • @almandsky Fix useDefaultRoute to work again after abstract transports

6.8.1 (2019-10-16)

  • @hayes Add unref method to transport interface

6.8.0 (2019-10-14)

  • @runk Add new protocol, stream, and a stream parameter for specifying it.

6.7.0 (2019-10-9)

  • @runk Code refactoring to have abstract transports

6.6.0 (2019-10-7)

  • @NinjaBanjo @msiebuhr Add udsGracefulErrorHandling, ensuring uds handles socket errors gracefully

6.5.1 (2019-9-28)

  • @msiebuhr Fix crasher when closing Unix Datagram Sockets without callback

6.5.0 (2019-9-22)

  • @bdeitte Update decrement to handle missing arguments the same way that increment does
  • @bdeitte Document that memory may grow unbounded in mock mode
  • @bdeitte Only load in unix-dgram library when uds protocol in use

6.4.1 (2019-9-19)

  • @jfirebaugh Fix cacheDns option when obtaining host from DD_AGENT_HOST

6.4.0 (2019-6-28)

  • @tghaas Add Node 12 support to uds protocol support
  • @jhoch README clarifications

6.3.0 (2019-5-18)

  • @paguillama Fix user defined tag example on README optional parameters
  • @gabsn Initial support for uds protocol
  • @bdeitte Updated and fixed up uds protocol support

6.2.0 (2019-4-10)

  • @ahmed-mez Add support for env variables DD_AGENT_HOST, DD_DOGSTATSD_PORT, and DD_ENTITY_ID
  • @JamesMGreene Fix syntax in README example

6.1.1 (2019-1-8)

  • @bdeitte Fix errorHandler to only happen again on errors
  • @Ithildir Readme fixes

6.1.0 (2019-1-5)

  • @bdeitte Ensure close() call always sends data before closing
  • @bdeitte Recommend errorHandler over client.socket.on() for handling errors
  • @mbellerose Fix the timer function type definition

6.0.1 (2018-12-17)

  • @msmnc Fix regression when tag value is a number
  • @bdeitte Make non-options in constructor more deprecated

6.0.0 (2018-12-15)

@bdeitte Major upgrade to the codebase to be more modern, overhaul tests, and many small tweaks. Most of this is internal to the project, but there are a few changes to note for everyone:

  • Now requires Node 6 or above
  • Update close() to handle errors better, not doubling up in error messages and not leaving uncaught errors

Everything else done here should be internal facing. Those changes include:

  • Use "lebab" to ES6-ify the project
  • Switch from jshint and eslint and make syntax updates based on this
  • Remove a lot of duplication in tests and many small fixups in tests
  • Start using Mocha 4
  • Stop using index.js for testing
  • Start using the code coverage report as part of the build
  • Remove the ignoring of errors on close of tests, and tear down tests in general better
  • Stop using "new Buffer", that is deprecated, and use Buffer.from() instead

5.9.2 (2018-11-10)

  • @stieg Add mockBuffer to types

5.9.1 (2018-9-18)

  • @etaoins Add asyncTimer types
  • @blimmer: Add increment doc snippet

5.9.0 (2018-7-27)

  • @chrismatheson: Fix timer to have duration in microseconds (was nanoseconds)
  • @chrismatheson: Add asyncTimer functionality

5.8.0 (2018-7-17)

  • @michalholasek Clean up code formatting and split up tests
  • @michalholasek Add tcp protocol support
  • @remie Add tcp protocol support

5.7.0 (2018-7-4)

  • @Willyham Add support for recording buffers in mock mode

5.6.3 (2018-6-20)

  • @singerb correct close() type definition

5.6.2 (2018-6-15)

  • @mjesuele Fix time in timer

5.6.1 (2018-6-4)

  • @MattySheikh Typescript: add socket type for StatsD class

5.6.0 (2018-6-3)

  • @drewen TypeScript: add overload types for stats functions

5.5.1 (2018-5-30)

  • @emou Typescript declaration for the 'timer' method

5.5.0 (2018-5-30)

  • @drewen Split up single file, add code coverage capabilities

5.4.1 (2018-5-12)

  • @jasonsack Fixups for new useDefaultRoute option
  • @bdeitte Test against more modern set of Node versions in Travis

5.4.0 (2018-4-26)

  • @RobGraham Added distribution() support for DataDog v6

5.3.0 (2018-4-3)

  • @tanelso2 Added support for using default route on Linux

5.2.0 (2018-2-28)

  • @ericapisani Add timer decorator function

5.1.0 (2018-2-14)

  • @lautis Pass key-value tags as objects

5.0.1 (2018-2-2)

  • @punya-asapp Add childClient to TypeScript types

5.0.0 (2017-11-9)

  • @jgwmaxwell TypeScript typings, resolving the default export issue and missing options from last time. This is being marked as a major release, in caution given the revert last time, but it is not actually known to cause any backwards-compatible issues.

4.8.0 (2017-10-31)

  • @Jiggmin concat prefix and suffix in check function
  • @Jiggmin commit package-lock.json

4.7.1 (2017-10-31)

  • @Jiggmin Add backwards compatibility for global_tags

4.7.0 (2017-9-21)

  • @bdeitte Revert TypeScript typings, which ended up not being semver minor

4.6.0 (2017-9-19)

  • @jgwmaxwell TypeScript typings

4.5.0 (2017-5-4)

  • @jsocol Support default value with tags in increment

4.4.0 (2017-3-23)

  • @RijulB Global sample rate

4.3.1 (2016-11-7)

  • @RandomSeeded Fix callbacks not being triggered when using buffers

4.3.0 (2016-9-30)

  • @ggoodman Allow socket errors to be handled with errorHandler

4.2.0 (2016-8-3)

  • @mhahn Add support for DataDog service checks

4.1.1 (2016-5-22)

  • @ash2k date_happened should be seconds, not milliseconds

4.1.0 (2016-5-8)

  • @ash2k Support multiline text in DataDog events

4.0.0 (2016-5-7)

  • @ash2k Provided tags, including childClient() tags, override global tags with same names.

3.1.0 (2016-5-3)

  • @ash2k Support a client-wide error handler used in case no callback is provided and to handle various exceptions.

3.0.1 (2016-4-28)

  • @bdeitte Add 'use strict' to files and make changes needed for this.

3.0.0 (2016-4-27)

  • @ash2k Method to create child clients. (This is not a backwards-incompatible change but is rather large.)
  • @ash2k Shrink npm package a bit more

2.4.0 (2016-2-26)

  • @arlolra Shrink npm package
  • @arlolra/@bdeitte Move DNS errors when caching them to send() and use callback when possible
  • @bdeitte Use callback for Telegraf error when possible

2.3.1 (2016-2-3)

  • @Pchelolo Ensure messages not larger then maxBufferSize

2.3.0 (2016-1-17)

  • @bdeitte Fix increment(name, 0) to send a 0 count instead of 1
  • @bdeitte Flush the queue when needed on close()

2.2.0 (2016-1-10)

  • @bdeitte Document and expand on close API
  • @bdeitte Catch more error cases for callbacks

2.1.2 (2015-12-9)

  • @bdeitte Even more doc updates
  • @mmoulton Fix multiple tags with Telegraf

2.1.1 (2015-12-9)

  • @bdeitte Doc updates

2.1.0 (2015-12-9)

  • @mmoulton Add options.telegraf to enable support for Telegraf's StatsD line protocol format
  • @mmoulton Ensure message callback is sent in buffered case, even when we just buffer.

2.0.0 (2015-10-22)

  • @jjofseattle Add options.maxBufferSize and options.bufferFlushInterval
  • @bdeitte Change options.global_tags to options.globalTags for consistency

1.0.2 (2015-09-25)

  • @ainsleyc Thrown error when cacheDNS flag fails to resolve DNS name

1.0.1 (2015-09-24)