Skip to content
a java statsd client library
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings initial checkin Jun 7, 2012
src
vendor initial checkin Jun 7, 2012
.classpath
.gitignore
.project
.travis.yml
LICENSE
README.md update README for latest revision Aug 12, 2014
build.xml
java-statsd-client.pom

README.md

java-statsd-client

Build Status

A statsd client library implemented in Java. Allows for Java applications to easily communicate with statsd.

Downloads

The client jar is distributed via maven central, and can be downloaded here.

<dependency>
    <groupId>com.timgroup</groupId>
    <artifactId>java-statsd-client</artifactId>
    <version>3.0.1</version>
</dependency>

Usage

import com.timgroup.statsd.StatsDClient;
import com.timgroup.statsd.NonBlockingStatsDClient;

public class Foo {
  private static final StatsDClient statsd = new NonBlockingStatsDClient("my.prefix", "statsd-host", 8125);

  public static final void main(String[] args) {
    statsd.incrementCounter("bar");
    statsd.recordGaugeValue("baz", 100);
    statsd.recordExecutionTime("bag", 25);
    statsd.recordSetEvent("qux", "one");
  }
}
You can’t perform that action at this time.