Skip to content

Releases: DataDog/dogstatsd-csharp-client

9.1.0

28 Apr 15:40
cc8fe3b

Choose a tag to compare

Changes

  • [FEATURE] Add synchronous mode for serverless environments. Set StatsdConfig.SynchronousMode = true to bypass the async background worker and route metrics on the calling thread. Call Flush() at the end of each handler invocation to send any remaining buffered metrics before the sandbox freezes. See #227.

9.0.0

18 Aug 19:43
463bc3b

Choose a tag to compare

Breaking Changes

  • [FEATURE] Added support for tag cardinality, both globally and per-metric. (DogStatsD protocol v1.6).
    This allows for specifying the tag cardinality for enriched tags that are attached to metrics based on origin detection. A new field, Cardinality, is available on StatsdConfig to specify the default tag cardinality for all metrics. Additionally, a new parameter, cardinality, is now exposed on the main methods in DogStatsd and IDogStatsd, which allows for specifying the tag cardinality on a per-metric basis. See #213.

Changes

  • [FEATURE] Added support for cgroups-based origin detection. (DogStatsD protocol v1.4).
    This allows for detecting the origin of DogStatsD clients based on self-discovery of any cgroups that the application is running in. Applicable only to Linux. See #211.

  • [FEATURE] Added support for External Data-based origin detection (DogStatsD protocol v1.5).
    This allows for detecting the origin of DogStatsD clients based on information attached to workload pods from the Datadog Agent Admission Controller. See #209.

8.0.0

27 Oct 10:38
832b411

Choose a tag to compare

Breaking changes

  • [FEATURE] Support sending counters and gauges with timestamp. See #185 and #188.
    These PRs add a default parameter to the methods of DogStatsdService, DogStatsd and IDogStatsd. They also remove params for tags in IDogStatsd.Decrement.

  • [COMPATIBILITY] Remove support for old frameworks. See #186.
    This PR updates the targeted frameworks from netstandard1.3;netstandard2.0;netstandard2.1;net45;net461 to net461;netstandard2.0;netcoreapp3.1;net6.0
    It means netstandard1.3 and net45 are not supported anymore.

  • [IMPROVEMENT] Add an exception handler. See #183 and #187.
    These PRs add a default parameter to DogStatsdService.Configure, DogStatsd.Configure and IDogStatsd.Configure

  • [IMPROVEMENT] Add a Flush method to IDogStatsd. See #182.
    This PR adds a new method to IDogStatsd.

Changes

  • [IMPROVEMENT] Setting up codescanning action. See #175.

7.0.1

28 Jun 13:08
7.0.1
9c63826

Choose a tag to compare

7.0.1 / 06-28-2022

Changes

  • [BUGFIX] Don't throw an exception when the size of the metric exceeds the internal buffer capacity. See #178.

7.0.0

13 Oct 13:18
ded592e

Choose a tag to compare

7.0.0 / 10-13-2021

Breaking changes

Enable client-side aggregation by default for simple metric types. See #172.

By default, metrics are aggregated before they are sent. For example, instead of sending 3 times my_metric:10|c|#tag1:value, DogStatsD client sends my_metric:30|c|#tag1:value once. You can disable client-side aggregation by setting ClientSideAggregation property to null.
For more details about how client-side aggregation works see #134.

Enabling client-side aggregation has the benefit of reducing the network usage and also reducing the load for the DataDog Agent.

When an application sends a lot of different contexts but each context appear with a very low frequency, then enabling client-side aggregation may take more memory and more CPU. A context identifies a metric name, a tag sets and a metric type. The metric datadog.dogstatsd.client.aggregated_context reported by DogStatsD C# client counts the number of contexts in memory used for client-side aggregation. There is also the metric datadog.dogstatsd.client.metrics_by_type that represents the number of metrics submitted by the client before aggregation.

Set good default values for UDS and UDP buffer sizes. See #170.

This PR changes the default values for unix domain socket and UDP buffer sizes.
In most cases, this change should work out of the box. Unlike Windows and Linux, on some operating systems like MacOS, the maximum unix domain socket buffer size is lower than 8192. For these systems you have to set StatsdMaxUnixDomainSocketPacketSize to the maximum supported value.

Changes

  • [BUGFIX] Update links to https://docs.datadoghq.com. See #171.
  • [IMPROVEMENT] Add end of line separator after each message. See #169.
  • [IMPROVEMENT] Add benchmark for client side aggregation. See #168.
  • [BUGFIX] Fix the implementation of MetricStatsKey.GetHashCode(). See #167.
  • [IMPROVEMENT] Update client side flush interval from 3s to 2s. See #166.
  • [BUGFIX] For event, use the size of the title and the text in UTF8. See #165.
  • [IMPROVEMENT] Performance improvements. See #164.
  • [FEATURE] Add benchmarks. See #163.
  • [IMPROVEMENT] Improve performance. See #162.
  • [FEATURE] Add the telemetry metric aggregated_context_by_type. See #161.
  • [IMPROVEMENT] Minor grammar update in comments. See #160 (Thanks @shreyamsh).
  • [IMPROVEMENT] Use Thread.Sleep instead of Task.Delay when possible. See #159 (Thanks @kevingosse).
  • [IMPROVEMENT] Remove System.Net.NameResolution for netstandard2.0. See #155 (Thanks @fjmorel ).
  • [IMPROVEMENT] Use dedicated threads for background workers. See #151 (Thanks @kevingosse).

6.0.0

23 Nov 18:22
13aa3ed

Choose a tag to compare

Breaking changes

  • Methods Counter, Gauge, Histogram, Distribution and Timer from DogStatsdService and DogStatsd are not generic methods anymore. (See ab18f95)
  • The following obsolete code is removed:
    • Remove variables StatsdConfig.DD_ENTITY_ID_ENV_VAR, StatsdConfig.DD_DOGSTATSD_PORT_ENV_VAR and StatsdConfig.DD_AGENT_HOST_ENV_VAR
    • Visibility change from public to internal for: ICommandType, IRandomGenerator, IStopWatchFactory, IStopwatch, MetricsTimer, RandomGenerator, StopWatchFactory, Stopwatch, ThreadSafeRandom and StatsdUDP.
    • Remove Statsd, IStatsd and IStatsdUDP.
  • Rename environment variable DD_AGENT_PIPE_NAME to DD_DOGSTATSD_PIPE_NAME.

Changes

  • [IMPROVEMENT] Add Flush method. See #144.
  • [FEATURE] Add client side aggregation for Count, Gauge and Set metrics. See #133, #134 and #143.
  • [FEATURE] Add support for universal service tagging. See #139 (Thanks @kevingosse)
  • [BUGFIX] Work around 64 bit RyuJIT ThreadAbortException bug on the .NET Framework. See #137 (Thanks @jdasilva-olo).

5.1.0

08 Sep 09:36
8e40053

Choose a tag to compare

Changes

  • [IMPROVEMENT] Reduce the memory allocations. See #123, #124, #127 and #132.
  • [IMPROVEMENT] Add a telemetry end point. See #130.
  • [IMPROVEMENT] Add the support for .NET framework 4.5.0. See #128.

5.0.2

29 May 16:06
187667e

Choose a tag to compare

Changes

  • [BUGFIX] Fix an issue where the client cannot send metrics after the DogStatsd server restart. See #125.

5.0.1

19 May 12:36
2406d7c

Choose a tag to compare

Changes

  • [BUGFIX] Fix System.Net.Sockets.SocketException when telemetry is enabled and Statsd server is not up. See #120.
  • [BUGFIX] Fix high CPU usage. See #121.

5.0.0

13 May 16:01
418c692

Choose a tag to compare

Significant improvements of DogStatsdService and DogStatsd performance.

Breaking changes

You must call DogStatsdService.Dispose() or DogStatsd.Dispose() before your program termination in order to flush metrics not yet sent.
Statsd is marked as obsolete.

Changes

  • [IMPROVEMENT] Both DogStatsdService and DogStatsd methods do not block anymore and batch several metrics automatically in one UDP or UDS message. See #108 and #109.
  • [IMPROVEMENT] Send telemetry metrics. See #110 and #114.
  • [IMPROVEMENT] Enable StyleCop. See #111, #112 and #113.