The Simplest .NET 4.0+ client for Etsy's StatsD server.
This client will let you fire stats at your StatsD server from a .NET application. Very useful for mixed technology systems that you would like to keep near real-time stats on.
.NET 4.0 (Websocket support)
PM> Install-Package NStatsD.Client
Just include the Client.cs file in your project. Add the following to your config's appSettings node.
<!-- the enabled attribute is optional, defaults to true. If set to false, will not send metrics to statsd server -->
<!-- the prefix attribute is optional, if set it will prefix all metrics and append the prefix with a '.' if missing -->
<add key="NStatsD.Enabled" value="true" />
<add key="NStatsD.Prefix" value="test.demo." />
<add key="NStatsD.Host" value="localhost" />
<add key="NStatsD.Port" value="8125" />
// Actual stat that gets sent is "test.demo.increment"
NStatsD.Client.Current.Increment("increment");
NStatsD.Client.Current.Increment("increment", 0.5); // Optional Sample Rate included on all methods
NStatsD.Client.Current.Decrement("decrement");
NStatsD.Client.Current.Timing("timing", 2345);
NStatsD.Client.Current.Gauge("gauge", 45);
NStatsD.Client is licensed under the MIT license.