Skip to content

Releases: DataDog/dogstatsd-ruby

v5.6.1

07 Sep 09:21
v5.6.1
3c09eaf
Compare
Choose a tag to compare

5.6.1 / 2023.09.07

  • [IMPROVEMENT] Add support for IPv6 UDP connection. #280 by @kazwolfe

v5.6.0

10 Jul 12:42
v5.6.0
2103c3c
Compare
Choose a tag to compare

5.6.0 / 2023.07.10

  • [FEATURE] Add the delay_serialization option, allowing users to delay expensive serialization until a more convenient time, such as after an HTTP request has completed. In multi-threaded mode, it causes serialization to happen inside the sender thread. #271 by @pudiva and @BlakeWilliams

  • [FEATURE] Also, support the sender_queue_size in single_thread mode, so that it can benefit from the new delay_serialization option. Messages are now queued (possibly unserialized) until sender_queue_size is reached or #flush is called. It may be set to Float::INFINITY, so that messages are indefinitely queued until an explicit #flush. #271 by @pudiva and @BlakeWilliams

  • [IMPROVEMENT] Add support of DD_DOGSTATSD_URL for configuration through environment variable. Valid formats are: udp:https://some-host, udp:https://some-host:port and unix:https:///path/to/unix.sock. DD_DOGSTATSD_URL has priority on other environment vars (DD_AGENT_HOST, DD_DOGSTATSD_PORT and DD_DOGSTATSD_SOCKET) but does not throw an error if others are set, values are overridden instead. #278 by @remeh

  • [BUGFIX] Fix NoMethodError when Datadog::Statsd is initialized without telemetry. #272 by @matthewshafer

v5.5.0

01 Jun 08:57
v5.5.0
17b8bc1
Compare
Choose a tag to compare

5.5.0 / 2022.06.01

  • [FEATURE] Add distribution_time method to facilitate measuring timing of a yielded block. #248 by @jordan-brough

  • [BUGFIX] Stop flush timer before closing the queue #257 by @abicky

  • [IMPROVEMENT] Various warnings removed #258 by @abicky

  • [OTHER] Remove unused rack dependency #260 by @remeh

v5.4.0

01 Mar 15:35
17c00f3
Compare
Choose a tag to compare

5.4.0 / 2022.03.01

  • [IMPROVEMENT] Add a pre_sampled option to metric methods [#235][] by [@matthewshafer][]

  • [OTHER] Ruby versions earlier than 2.1.0 are no longer supported. Ruby-2.0 was EOL as of 2016-02-24.

  • [OTHER] Ruby versions 3.0 and 3.1 are now supported, including a fix for keyword arguments to StatsD#open. [#240][]

v5.3.3

02 Feb 20:28
Compare
Choose a tag to compare

5.3.3 / 2022.02.02

  • [IMPROVEMENT] Add option "buffer_flush_interval" to flush buffered metrics [#231][] by [@abicky][]

  • [IMPROVEMENT] Add Sender.queue_size limits to limit number of buffered metrics [#232][] by [@djmitche][]

  • [IMPROVEMENT] The client can now be configured to use UDS via the DD_DOGSTATSD_SOCKET environment variable.
    This variable does not take precedence over any explicit parameters passed to the Statsd constructor.
    [#227][] by [@djmitche][]

5.3.2 / 2021.11.03

03 Nov 13:48
d833672
Compare
Choose a tag to compare
  • [OTHER] add a warning message for the v5.x update on install #222 by @djmitche

v5.3.1 / 2021.10.21

21 Oct 07:33
v5.3.1
495cd95
Compare
Choose a tag to compare
  • [OTHER] restore connection opening behavior from before 5.3.0 (connections not opened on client instantiation but on the first write instead) #214 by @remeh

v5.3.0 / 2021.10.06

06 Oct 09:47
v5.3.0
872e4fc
Compare
Choose a tag to compare
  • [ENHANCEMENT] Automatically re-allocate resources (e.g. background thread) if dogstatsd-ruby is used in an application using forks #205 by @remeh
    This will help in scenarios where applications are not handling cleanup/re-creation of the dogstatsd-ruby instances in forked processes. If you are an user of v4.x versions of dogstatsd-ruby and want to migrate to v5.x, please make sure to go through this section of the README and through the migration guide.

  • [BUGFIX] Fix client telemetry in applications using forks #205 by @remeh

Please note that this version will emit a deprecation message if you are using ruby < 2.1: we plan to drop support for ruby 2.0 in a future minor release.

v5.2.0 / 2021.07.01

01 Jul 12:23
v5.2.0
f95552a
Compare
Choose a tag to compare
  • [FEATURE] Add single_thread mode for users having issues with the companion thread. #194 by @remeh

You can use this mode to avoid spawning a companion thread while using v5.x versions:

# Import the library
require 'datadog/statsd'

# Create a DogStatsD client instance.
statsd = Datadog::Statsd.new('localhost', 8125, single_thread: true)
...
# release resources used by the client instance and flush last metrics
statsd.close()

Note that if you want to restore the behavior of v4.x versions, you can also configure the buffer to flush on every metric submission:

# Import the library
require 'datadog/statsd'

# Create a DogStatsD client instance using UDP
statsd = Datadog::Statsd.new('localhost', 8125, single_thread: true, buffer_max_pool_size: 1)
...
# to close the instance is not necessary in this case since metrics are flushed on submission
# but it is still a good practice and it explicitely closes the socket
statsd.close()

v5.1.0 / 2021.06.17

17 Jun 15:01
v5.1.0
0eef980
Compare
Choose a tag to compare
  • [FEATURE] Flush last metrics on Statsd#close #180 by @kbogtob
  • [ENHANCEMENT] Do not try to flush where there is no available message_queue [#189][] by @remeh
  • [OTHER] Add pry to development dependencies and enable gem in Gemfile #192 by @ivoanjo
  • [OTHER] Expand Ruby Support to Rubies 2.6, 2.7, and 3.0 [#191][] by @laserlemon

Known issues

If the DogStatsD client is instantiated before a fork, the forked process won't copy the companion thread that the original client needs to flush and the client won't work properly. This issue will be addressed in an upcoming version. If you are concerned by this issue, please read this section of the README.