A basic implementation of a Julia StatsD client.
julia> Pkg.add("Statsd")
julia> using Statsd
Statsd.jl
defaults to sending metrics to 127.0.0.1:8125
.
You can specify a hostname, port and a prefix as well.
# Setup the statsd client
client = Statsd.Client("172.10.0.3", 9003, "company.project.cluster")
# increment http.requests bucket
Statsd.incr(client,"http.requests")
# decrement http.requests bucket
Statsd.decr(client,"http.requests")
# job.duration took 500ms to complete
Statsd.timing(client,"job.duration",500)
# Set disk.usage value to 1029
Statsd.gauge(client,"disk.usage",1029)
# Set unique.occurence to 3001
Statsd.set(client,"unique.occurence", 3001)
For more information please refer to the StatsD project.