An open API service indexing awesome lists of open source software.

https://github.com/tim-group/java-statsd-client

a java statsd client library
https://github.com/tim-group/java-statsd-client

Last synced: 3 months ago
JSON representation

a java statsd client library

Awesome Lists containing this project

README

          

java-statsd-client
==================

[![Build Status](https://travis-ci.org/tim-group/java-statsd-client.svg?branch=master)](https://travis-ci.org/tim-group/java-statsd-client)

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](http://search.maven.org/#search%7Cga%7C1%7Cg%3Acom.timgroup%20a%3Ajava-statsd-client).

```xml

com.timgroup
java-statsd-client
3.0.1

```

Usage
-----
```java
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");
}
}
```