simple client library to interface with statsd
Latest commit 2a24361 Apr 18, 2016 @pyr release 0.4.0
Failed to load latest commit information.
test/clj_statsd refactor to avoid calling send-stat for rate events Apr 18, 2016
.gitignore add target dir Oct 29, 2012
.travis.yml add travis for tests Nov 10, 2012
LICENSE add license Jul 7, 2012 release 0.4.0 Apr 18, 2016

clj-statsd is a client for the statsd protocol for the clojure programming language.


An Example

Here is a snippet showing the use of clj-statsd:

(ns testing
    (:require [clj-statsd :as s]))

(s/setup "" 8125)

(s/increment :some_counter)         ; simple increment
(s/decrement "some_other_counter")  ; simple decrement
(s/increment :some_counter 2)       ; double increment
(s/increment :some_counter 2 0.1)   ; sampled double increment

(s/timing :timing_value 300)        ; record 300ms for "timing_value"

(s/gauge :current_value 42)         ; record an arbitrary value

Buckets can be strings or keywords. For more information please refer to statsd


The easiest way to use clj-statsd in your own projects is via Leiningen. Add the following dependency to your project.clj file:

[clj-statsd "0.4.0"]

To build from source, run the following commands:

lein deps
lein jar