statsd for pony


Stewart Gebbie
 

Hi,

In preparation for some other projects that I have in mind I have put
together a simple StatsD client library for Pony:

https://github.com/sgebbie/pony-statsd

This is a very early release and I have only just finished testing the
'demo' code against: graphite + collectd.

The usage within any code needing to be instrumented with statsd type
telemetry should be simple and straight forward:

```
let statsd: StatsD = StatsD.create(env.root as AmbientAuth, "statsd.host")?

let mygauge: Gauge = statsd.gauge("test.gauge.bucket")
let myset: Set = statsd.set("test.set.bucket")
let mytimer: Timer = statsd.timer("test.timer.bucket")
let mycounter: Counter = statsd.timer("test.counter.bucket")

mygauge.inc(5)
mytimer.ms(45)
myset.add(404)
mycounter.now(3)

mygauge.dec(2)

mygauge.set(6)
```

If any one is interested please take a look. Feedback and pull requests
are obviously most welcome.

Thanks,
Stewart.

--
Stewart Gebbie <sgebbie@gethos.net>
+27 84 738 2899 http://gethos.net

Join user@pony.groups.io to automatically receive all group messages.