Releases: DataDog/dogstatsd-ruby
v5.6.2
v5.6.1
v5.6.0
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://some-host, udp://some-host:port and unix:///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
5.5.0 / 2022.06.01
v5.4.0
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
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
v5.3.1 / 2021.10.21
v5.3.0 / 2021.10.06
-
[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
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()