- @bdeitte Upgrade mocha from 10.x to 11.x and fix all dev dependency security vulnerabilities (serialize-javascript, ajv)
- @bdeitte BREAKING: Drop Node.js 16 support, now requires Node.js >= 18.0.0. Usually this type of change only goes in a major update, but given how very old this is, making this a minor update.
- @bdeitte Version 14.1.0 published without a README for an unknown reason. Ensuring everything is reset locally and running publish again to attempt to fix.
- @bdeitte Fill in some missing areas for automated tests
- @bdeitte CPU performance improvements: cache byteLength in sendMessage, use hrtime.bigint in timer functions, use Map in overrideTags
- @bdeitte Fix methods losing parameters when given empty object for sampleRate. Fixes #43
- @bdeitte Fix increment/decrement losing tags when called with tags and callback but no value. Fixes #139
- @bdeitte BREAKING: Add dynamic tag support for timer/asyncTimer/asyncDistTimer via context object. Wrapped functions now receive an additional
ctxparameter as the last argument. Fixes #202 - @bdeitte Fix TCP graceful reconnection not triggering due to string error comparison. Fixes #301
- @bdeitte Allow ':' in telegraph values and add more tag tests. Fixes #303
- @boblauer Calculate buffer and message size in a way that accounts for non-ASCII characters
- @bdeitte Add documentation for OpenTelemetry Collector StatsD receiver compatibility
- @bdeitte Sanitize protocol-breaking characters in metric names and tags. Fixes #238. Characters like
|,:,\n,#, and,in metric names or tags are now replaced with_to prevent malformed packets. - @bdeitte Document how to handle metrics on shutdown
- @bdeitte Prevent "socket ended" errors and handle the client disconnection errors more gracefully. Fixes #247
- @bdeitte Breaking: Prefix and suffix now automatically include period separators if needed. If you specify
prefix: 'myapp', it will be normalized to'myapp.'. Similarly,suffix: 'prod'becomes'.prod'. This ensures metrics likemyapp.request.timeinstead ofmyapprequest.time. If your prefix/suffix already includes the period, no change is needed. - @bdeitte Auto-detect UDP socket type (udp4/udp6) based on host IP address. IPv6 addresses like
::1will automatically useudp6sockets, fixing issues on Node.js 17+ wherelocalhostmay resolve to IPv6. - @bdeitte Add DogStatsD timestamp support via options object. Metric methods now accept an options object with
sampleRate,tags, andtimestampproperties. Timestamp can be a Date object or Unix seconds. - @bdeitte Add Sinon.js for fake timers in tests, speeding up DNS cache and UDP socket options tests
- @bdeitte Add client-side telemetry support with
includeDatadogTelemetryoption (disabled by default and in beta) and telemetryFlushInterval
- @bdeitte event calls now use prefix and suffix
- @bdeitte mock mode no longer creates a socket
- @bdeitte using an IP no longer invokes DNS lookup
- @bdeitte client close no longer fails when errorHandler is defined but socket is null
- @bdeitte tags ending with '\' no longer breaks telegraph
- @bdeitte Add debug logging that can be enabled with "NODE_DEBUG=hot-shots"
- @bdeitte Revert some buffering code to fix tag duplication issue seen with Datadog
- @manishrjain Add retry mechanism for UDS with udsRetryOptions
- @bdeitte Revert change to improve memory/performance of overrideTags and add more tests
- @bdeitte Upgrade node-unix-dram to support latest Node
- @bdeitte Add more tests for uncovered areas
- @bdeitte When DD_AGENT_HOST is set to empty string, consider it to be undefined
- @bdeitte Set max size for maxBufferSize to 8192 when using UDS
- @bdeitte Improve memory/performance of overrideTags (reverted in 11.1.1)
- @bdeitte Stop testing much older Node.js versions and test latest: now testing Node 16 to Node 24
- @bdeitte Enable buffering by default (as 8192) for UDS connections
- @bdeitte Stop adding extra newline in buffering cases where it's not needed
- @bdeitte Flush buffering earlier when possible (reverted in 11.3.0)
- @bdeitte Add CLAUDE.md for easlier Claude usage
- @bdeitte Ensure client.close() does not throws errors when mock: true is set
- @thiago-negri Add 'includeDataDogTags' property to 'ClientOptions' type
- @thiago-negri Add option 'includeDataDogTags'
- @bdeitte Upgrade dependencies for security warning and a few README updates
- @matteosb Handle synchronous socket.send error in sendUsingDnsCache
- @lachlankidson Add gaugeDelta function
- @bdeitte Various dev library updates
- @bdeitte Add Node 20 testing
- @imyourmanzi In TypeScript, narrow callback parameter types
- @bdeitte Remove Node 8 from supported list and add testing of Node 18
- @albert-mirzoyan add stream property type to ClientOptions
- @bdeitte Upgrade unix-dgram to support Node 18
- @hjr3 Add udpSocketOptions to control how UDP socket is created
- @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
- @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
- @amc6 TypeScript: add missing decrement overload type
- @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
- @maxday Add a closingFlushInterval option which allows stopping quicker
- @roim Use errorHandler when possible on UDS socket replace error
- @cmaddalozzo Close unix domain socket after unsuccessful attempts to connect
- @dvd-z Fix date_happened to allow usage of numbers
- @chotiwat Handle UDS errors occurring when sending metrics
- @stephenmathieson Make close callback optional in TypeScript definition
- @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.
- @maleblond Support multiple values for the same tag key
- @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
- @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
- @DerGut Fix udsGracefulErrorHandling default value
- @tebriel Add asyncDistTimer function
- @Impeekay Add date type to timing function
- @benblack86 Unreference underlying socket/interval to prevent process hangs
- @kazk Fix types for set/unique
- @lbeschastny Sanitize ',' tags characters for telegraf
- @MichaelSitter add tagPrefix and tagSeparator options
- @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
- @marciopd Add cacheDnsTtl
- @dependabot Bump acorn from 6.3.0 to 6.4.1
- @wision Actually fix cachedDns with udp
- @casey-chow TypeScript: parameterize function types in timer and asyncTimer
- @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
- @mrknmc Fix TypeError when increment called without a callback argument
- @ericmustin callback is not properly passed bytes argument
- @bdeitte Fix for socket on reading when cacheDns and udp in use
- @bdeitte Fix cacheDns with udp
- @gleb-rudenko Fix StatsD constructor typing
- @almandsky Fix useDefaultRoute to work again after abstract transports
- @hayes Add unref method to transport interface
- @runk Add new protocol, stream, and a stream parameter for specifying it.
- @runk Code refactoring to have abstract transports
- @NinjaBanjo @msiebuhr Add udsGracefulErrorHandling, ensuring uds handles socket errors gracefully
- @msiebuhr Fix crasher when closing Unix Datagram Sockets without callback
- @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
- @jfirebaugh Fix cacheDns option when obtaining host from DD_AGENT_HOST
- @paguillama Fix user defined tag example on README optional parameters
- @gabsn Initial support for uds protocol
- @bdeitte Updated and fixed up uds protocol support
- @ahmed-mez Add support for env variables DD_AGENT_HOST, DD_DOGSTATSD_PORT, and DD_ENTITY_ID
- @JamesMGreene Fix syntax in README example
- @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
- @msmnc Fix regression when tag value is a number
- @bdeitte Make non-options in constructor more deprecated
@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
- @stieg Add mockBuffer to types
- @chrismatheson: Fix timer to have duration in microseconds (was nanoseconds)
- @chrismatheson: Add asyncTimer functionality
- @michalholasek Clean up code formatting and split up tests
- @michalholasek Add tcp protocol support
- @remie Add tcp protocol support
- @Willyham Add support for recording buffers in mock mode
- @singerb correct close() type definition
- @mjesuele Fix time in timer
- @MattySheikh Typescript: add socket type for StatsD class
- @drewen TypeScript: add overload types for stats functions
- @emou Typescript declaration for the 'timer' method
- @drewen Split up single file, add code coverage capabilities
- @jasonsack Fixups for new useDefaultRoute option
- @bdeitte Test against more modern set of Node versions in Travis
- @RobGraham Added
distribution()support for DataDog v6
- @tanelso2 Added support for using default route on Linux
- @ericapisani Add timer decorator function
- @lautis Pass key-value tags as objects
- @punya-asapp Add childClient to TypeScript types
- @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.
- @Jiggmin Add backwards compatibility for global_tags
- @bdeitte Revert TypeScript typings, which ended up not being semver minor
- @jgwmaxwell TypeScript typings
- @jsocol Support default value with tags in increment
- @RijulB Global sample rate
- @RandomSeeded Fix callbacks not being triggered when using buffers
- @ggoodman Allow socket errors to be handled with errorHandler
- @mhahn Add support for DataDog service checks
- @ash2k date_happened should be seconds, not milliseconds
- @ash2k Support multiline text in DataDog events
- @ash2k Provided tags, including
childClient()tags, override global tags with same names.
- @ash2k Support a client-wide error handler used in case no callback is provided and to handle various exceptions.
- @bdeitte Add 'use strict' to files and make changes needed for this.
- @ash2k Method to create child clients. (This is not a backwards-incompatible change but is rather large.)
- @ash2k Shrink npm package a bit more
- @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
- @Pchelolo Ensure messages not larger then maxBufferSize
- @bdeitte Fix increment(name, 0) to send a 0 count instead of 1
- @bdeitte Flush the queue when needed on close()
- @bdeitte Doc updates
- @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.
- @jjofseattle Add options.maxBufferSize and options.bufferFlushInterval
- @bdeitte Change options.global_tags to options.globalTags for consistency
- @ainsleyc Thrown error when cacheDNS flag fails to resolve DNS name
- @bdeitte Add the event API used by DogStatsD
- @sivy Start from the base of https://github.com/sivy/node-statsd