crashlytics/clj-statsd

Name: clj-statsd

Owner: Crashlytics, Inc.

Description: simple client library to interface with statsd

Created: 2015-08-20 17:43:18.0

Updated: 2015-08-20 17:43:18.0

Pushed: 2015-08-25 18:44:34.0

Homepage:

Size: 159

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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

Build Status

An Example

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

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

(s/setup "127.0.0.1" 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

Installing

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.3.11"]

To build from source, run the following commands:

lein deps
lein jar

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.