Skip to content

nvmlabs/NStatsD.Client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NStatsD.Client

Build status

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.

Requirements

.NET 4.0 (Websocket support)

Installation

Nuget

PM> Install-Package NStatsD.Client

Manually

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" />

Usage

// 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);

License

NStatsD.Client is licensed under the MIT license.

About

A .NET 4.0 client for Etsy's StatsD server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 64.6%
  • F# 33.6%
  • Batchfile 1.8%