- [FEATURE] Added support for Origin Detection when the container-id is unavailable from inside the application container, only applies to
cgroupv2
. See #291. - [FEATURE] Added
DistributionSamples
which is similar toDistribution
, but it lets the client handle the sampling. The rate is passed to the Agent and not used for further sampling. See #296. - [IMPROVEMENT] The Aggregator no longer allocates memory if there are no tags present. See #297.
- [FEATURE] Add
WithMaxSamplesPerContext()
option to limit the number of samples per context. See #292. - [BUGFIX] Fix the
rate
of distributions and histograms when using client side aggregation. See #283.
- [FEATURE] Added support for
DD_DOGSTATSD_URL
. You can now use this env var to set the URL to use to connect to DogStatsD. See #273- Please be aware that
DD_DOGSTATSD_URL
takes precedence over theDD_AGENT_HOST
. If you have both set please make sure the value forDD_DOGSTATSD_URL
is correct.
- Please be aware that
- [BETA][FEATURE] Support sending counters and gauges with timestamp. See #262
- Please contact our support team for more information to use this feature: https://www.datadoghq.com/support/
- [BUGFIX] Fix issue where
ticker.Stop()
wasn't being called when aggregator is stopped. See #269, thanks @byronwolfman.
- [BUGFIX] Fix issue where tags of aggregated contexts could be modified after being sampled. See #258.
- [FEATURE] Adding support for container origin detection. See #250.
- [FEATURE] Adding
IsClosed
method the client. See #254, thanks @lucassscaravelli. - [FEATURE] Adding a mock for the
Client
interface to ease testing from users. See #255. - [IMPROVEMENT] Optimize
getContext
andgetContextAndTags
functions. See #253, thanks @martin-sucha. - [IMPROVEMENT] Export error
MessageTooLongError
to catch error when sending message that can't fit in a buffer. See #252. - [BUGFIX] Add missing
GetTelemetry
from theClient
Interface. See #255.
- [BUGFIX] Fix Windows erroneous import. See #242, thanks @programmer04.
- [BUGFIX] Fix Event.Check method: text is no longer required. See #235.
Many field/methods have been removed from the public API of the client to allow for the client internals to evolve more easily in the future without breaking the public API of the client.
- New import path for the v5 is
github.com/DataDog/datadog-go/v5/statsd
- The project now use go.mod file for its dependencies.
WithDevMode
option has been removed. The extended telemetry enabled byWithDevMode
is now part of the default telemetry.WithWriteTimeoutUDS
option has been renamedWithWriteTimeout
since it also impact named pipe transport.SetWriteTimeout
method has been removed in favor ofWithWriteTimeout
option.- The following internal fields and methods have been removed from the public API:
WriterNameUDP
WriterNameUDS
WriterWindowsPipe
TelemetryInterval
- Field
Client.Namespace
is now private, please use theWithNamespace
option. - Field
Client.Tags
is now private, please use theWithTags
option. - Method
NewBuffered
has been removed in favor of theWithMaxMessagesPerPayload()
option. Instead ofstatsd.NewBuffered(add, bufferLength)
please usestatsd.New(addr, statsd.WithMaxMessagesPerPayload(bufferLength))
Encode
method forEvent
andServiceCheck
have been removed.- The
Check
method forEvent
andServiceCheck
now uses pointer receivers. - All
Options
internals are no longer part of the public API. Only the part needed by the client app is left in the public API. This also improves/clarifies theOptions
documentation and usage. statsdWriter
have been removed from the API,io.WriteCloser
can now be used instead.SenderMetrics
andClientMetrics
structs as well asFlushTelemetryMetrics
method have been removed from the public API in favor of theTelemetry
struct and theGetTelemetry
method. The client telemetry is now cummulative since the start of the client instead of being reset after being sent to the Agent. SeeTelemetry
struct documentation for more information on what each field represents. This allows client apps to take action based on the telemetry (ex: adapting sampling rate based on the number of packets dropped). The telemetry sent to the agent hasn't changed so the same dashboard can be used for V4 and V5 apps.- Client side aggregation for Counts, Gauges and Sets is enabled by default. See
WithoutClientSideAggregation()
option to disable it. WithBufferShardCount
option has been renamedWithWorkersCount
.
- [FEATURE] Adding public method
GetTelemetry
to retrieve the client internal telemetry since the start of the client. - [FEATURE] Client side aggregation for Counts, Gauges and Sets is enabled by default.
WithExtendedClientSideAggregation()
for Timings, Histograms and Distributions is still disabled by default. Both features are no longer considered BETA.
- [BUGFIX] Fix
Event.Check
method: text is no longer required. See #237.
- [BETA][BUGFIX] Fix race condition in aggregation where two sample could overwrite each other when sampled for the first time. See #225
- [BUGFIX] Prevent telemetry from using the client global namespace. See #205
- [BETA][BUGFIX] Fix timings having a different precision with and without extended aggregation. See #204
- [BETA][IMPROVEMENT] Reduce aggregation default window to 2s to reduce sampling aliasing. See #199
- [IMPROVEMENT] Automatically add a "\n" after each metric so the agent can determine if a metric is truncated. Per source EOL detection was made available in agent 7.28 with the
dogstatsd_eol_required
setting. See #198
- [BETA] Increase the number of workers in the aggregator when using channelMode with extended aggregation to have similar performance than channelMode without aggregation. See #195.
- [BETA BUGFIX] Fix telemetry with extended aggregation and channelMode. See #194.
- [BETA] Support sample rate and channel mode for extended aggregation (ie: histograms, distributions and timings). See #187.
- [BUGFIX] Fix support of UDS and named pipe for DD_AGENT_HOST environment variable. See #192.
- [IMPROVEMENT] Increase UDS default timeout from 1ms to 100ms. See #186.
- [IMPROVEMENT] Defer connection establishment to first write for Windows Named Pipe. See #190.
- [BETA BUGFIX] Fix multi-metric aggregation when packing different metrics in the same packet. See #181.
- [FEATURE] Add support for Windows Named Pipes (Windows only). See #182 and #185.
- [BUGFIX] Fix race condition when using sample rate (introduce in 4.3.0). See #179.
- [BETA] Adding client side aggregation for distributions, histograms and timings. See #176.
- [IMPROVEMENT] Use a worker-specific random source to remove lock contention. See #178. Thanks to @matthewdale.
- [IMPROVEMENT] Update devMode telemetry naming and taging to ease graphing in Datadog. See #175.
- [UDS] Use better payload size defaults for UDS connections. See #171.
[BETA BUGFIX] Ignore sampling rate when client side aggregation is enabled (for Gauge, Count and Set). See #170.
[FEATURE] Adding a new option WithDevMode()
, to send more telemetry metrics to ease troubleshooting issues. See #169.
- [BUGFIX] Fix incomplete manual flush of the sender when the client isn't stopped. See #163.
- [FEATURE] Add new option
WithTelemetryAddr
, to send the telemetry data to a different endpoint. See #157. - [BUGFIX] Fix race condition in the flush mechanism of the aggregator. See [#166][]. Thanks to @cyx.
- Dropping support for EOL versions of Golang 1.11 and lower.
- [BUGFIX] Fix panic on 32bits and ARM when using the telemetry. See #156.
- [BETA BUGFIX] Fix typo in method name to configure the aggregation window interval. See #154.
- [BUGFIX] Fix panic when calling CloneWithExtraOptions with a nil client. See #148.
- [FEATURE] Add new function to clone a Client, so library can inherit and extend options from the main application. See #147.
- [IMPROVEMENT] Auto append a '.' when needed to namespace. See #145. Thanks to @kamatama41.
- [IMPROVEMENT] Add the client global tags to the telemetry tags. See #143. Thanks to @chrisleavoy.
- [IMPROVEMENT] Reduce lock contention by sharding worker by metric name. See #108.
- [FEATURE] Adding a "channel mode" to send metrics to the client, disable by default. See #134.
- [BUGFIX] Fix metrics not being flushed when the client is closed. See #144.
- [BETA] Adding client side aggregation for Gauge, Count and Set. See #139.
- [IMPROVEMENT] Add support for
DD_ENV
,DD_SERVICE
, andDD_VERSION
to set global tags forenv
,service
andversion
/ See #137
- [IMPROVEMENT] Improve tags for the telemetry. See #118.
- [IMPROVEMENT] Add option to disable the telemetry. See #117.
- [IMPROVEMENT] Add metrics, event and service check count to the telemetry. See #118.
- [BUGFIX] Fix Unix domain socket path extraction. See #113.
- [BUGFIX] Fix an issue with custom writers leading to metric drops. See #106.
- [BUGFIX] Fix an error check in uds.Write leading to unneeded re-connections. See #115.
- [BUGFIX] Close the stop channel when closing a statsd client to avoid leaking. See #107.
- [IMPROVEMENT] Add all
Client
public methods to theClientInterface
andNoOpClient
. See #100. Thanks @skaji.
- [FEATURE] Add a noop client. See #92. Thanks @goodspark.
- [FEATURE] Add a way to configure the maximum size of a single payload (was always 1432, the optimal size for local UDP). See #91.
- [IMPROVEMENT] Various performance improvements. See #91.
- [OTHER] The client now pre-allocates 4MB of memory to queue up metrics. This can be controlled using the WithBufferPoolSize option.
- Sending a metric over UDS won't return an error if we fail to forward the datagram to the agent. We took this decision for two main reasons:
- This made the UDS client blocking by default which is not desirable
- This design was flawed if you used a buffer as only the call that actually sent the buffer would return an error
- The
Buffered
option has been removed as the client can only be buffered. If for some reason you need to have only one dogstatsd message per payload you can still use theWithMaxMessagesPerPayload
option set to 1. - The
AsyncUDS
option has been removed as the networking layer is now running in a separate Goroutine.
- [IMPROVEMENT] Use an error constant for "nil client" errors. See #90. Thanks @asf-stripe.
- [FEATURE] UDS: non-blocking implementation. See #81.
- [FEATURE] Support configuration from standard environment variables. See #78.
- [FEATURE] Configuration at client creation. See #82.
- [IMPROVEMENT] UDS: change Mutex to RWMutex for fast already-connected path. See #84. Thanks @KJTsanaktsidis.
- [IMPROVEMENT] Return error when using on nil client. See #65. Thanks @Aceeri.
- [IMPROVEMENT] Reduce
Client.format
allocations. See #53. Thanks @vcabbage. - [BUGFIX] UDS: add lock to writer for concurrency safety. See #62.
- [DOCUMENTATION] Document new options, non-blocking client, etc. See #85.
- [TESTING] Adding go 1.10 and go 1.11 to CI. See #75. Thanks @thedevsaddam.
Version 2.0.0
contains breaking changes and beta features, please refer to the
Notes section below for details.
- [BREAKING]
statsdWriter
now implements io.Writer interface. See #46. - [BUGFIX] Flush buffer on close. See #47.
- [BETA] Add support for global distributions. See #45.
- [FEATURE] Add support for Unix Domain Sockets. See #37.
- [FEATURE] Export
eventAlertType
andeventPriority
. See #42, thanks @thomas91310. - [FEATURE] Export
Flush
method. See #40, thanks @colega. - [BUGFIX] Prevent panics when closing the
udsWriter
. See #43, thanks @jacek-adamek. - [IMPROVEMENT] Fix issues reported by Golint. See #39, thanks @tariq1890.
- [IMPROVEMENT] Improve message building speed by using less
fmt.Sprintf
s. See #32, thanks @corsc.
- [FEATURE] Export serviceCheckStatus allowing interfaces to statsd.Client. See #19 (Thanks @Jasrags)
- [FEATURE] Client.sendMsg(). Check payload length for all messages. See #25 (Thanks @theckman)
- [BUGFIX] Remove new lines from tags. See #21 (Thanks @sjung-stripe)
- [BUGFIX] Do not panic on Client.Event when
nil
. See #28 - [DOCUMENTATION] Update
decr
documentation to match implementation. See #30 (Thanks @kcollasarundell)
We hadn't been properly versioning this project. We will begin to do so with this
1.0.0
release. We had some contributions in the past and would like to thank the
contributors @aviau, @sschepens, @jovanbrakus, @abtris, @tummychow, @gphat, @diasjorge,
@victortrac, @seiffert and @w-vi, in no particular order, for their work.
Below, for reference, the latest improvements made in 07/2016 - 08/2016
- [FEATURE] Implemented support for service checks. See #17 and #5. (Thanks @jovanbrakus and @diasjorge).
- [FEATURE] Add Incr, Decr, Timing and more docs.. See #15. (Thanks @gphat)
- [BUGFIX] Do not append to shared slice. See #16. (Thanks @tummychow)