skbkontur/Graphite.NET

Name: Graphite.NET

Owner: Kontur

Description: .NET client library for Graphite and StatsD

Created: 2014-12-20 09:03:03.0

Updated: 2015-04-05 12:50:42.0

Pushed: 2015-04-05 12:50:42.0

Homepage:

Size: 124

Language: C#

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Graphite.NET

A simple Graphite client library for .NET, including a WCF behavior for measuring duration of service operation calls.

A client for StatsD is also included.

Graphite
Usage
mport namespace
g Graphite;

..

reate an UDP client for sending metrics to "localhost:2003", prefixing all keys with "foo.bar"
g(var client = new GraphiteUdpClient("localhost", 2003, "foo.bar"))

// Report a metric
client.Send("baz", 93284928374);

// Report a metric specifying timestamp
client.Send("baz", 93284928374, DateTime.Now.AddSeconds(42));

StatsD
Usage
mport namespace
g Graphite.StatsD;

..

reate a client for sending metrics to "localhost:8125", prefixing all keys with "foo.bar"
g(var client = new StatsDClient("localhost", 8125, "foo.bar"))

// Increment a counter
client.Incremenet("counter1"); // sends 'foo.bar.counter1:1|c'

// Increment a counter by 42
client.Incremenet("counter2", 42); // sends 'foo.bar.counter2:42|c'

// Decrement a counter by 5, sampled every 1/10th time
client.Decrement("counter3", 5, 0.1); // sends 'foo.bar.counter3:-5|c@0.1

// Report that the blahonga operation took 42 ms
client.Timing("blahonga", 42); // sends 'foo.bar.blahonga:42|ms'


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.