A simple statsd client written in Julia
5 Stars
Updated Last
7 Years Ago
Started In
February 2014

Quickstart | Configure the Statsd server | Using StatsdClient


A simple Julia implementation of a statsd client.

Please note that this package require Julia 0.3 with commit sha 6585e3de1b or later.


julia> Pkg.add("StatsdClient")
julia> using StatsdClient

Configure the Statsd server

The library defaults to Statsd server at

You can specify a server ip address and port as well.

server = StatsdClient.Statsd()
Statsd Server: Port: 8125

You can leave out the port number, in which case we use the default port of 8125.

server = StatsdClient.Statsd("")
Statsd Server: Port: 8125

Or you can specify the server ip address and port number.

server = StatsdClient.Statsd("",8125)
Statsd Server: Port: 8125

Using StatsdClient

Buckets can be either strings or keywords. For more information please refer to statsd and Measure Anything, Measure Everything blog post.

# configure statsd server
server = StatsdClient.Statsd("",8125)
Statsd Server: Port: 8125

increment/decrement buckets/counter

# increment example.increment bucket
# decrement example.decrement

Counters are the most basic statsd type.

# counter : adds 8 to example.count

Timers are meant to track the duration of some event. The statsd server operates only in milliseconds. So everything should be converted accordingly.

# timing : example.timing took 224ms to complete 

Gauges are a constant data type and they don't change unless you specifically change them (by adding a +/- sign to the value).

# gauges : record example.gauge as 123 
# adding a sign to the gauge value will change the value rather than set it.

Sets count the unique occurrences of events. For example, you can use it to count the number of unique visitors to your site by specifying the visitor's ip address as the value.

# sets : count unique occurrence of events