A statsd client library implemented in Java. Allows for Java applications to easily communicate with statsd. This is a fork adapted to use the BungeeCord Scheduler, because that one gets jealous of other executors very quickly.
The client jar is distributed via a custom Maven repository.
<repository>
<id>xxyy-public</id>
<url>https://repo.l1t.li/xxyy-public/</url>
</repository>
<dependency>
<groupId>me.minotopia</groupId>
<artifactId>bungee-statsd-client</artifactId>
<version>1.0.1</version>
</dependency>
import net.md_5.bungee.api.plugin.Plugin;
import com.timgroup.statsd.StatsDClient;
import com.timgroup.statsd.NonBlockingStatsDClient;
public class Foo extends Plugin {
private final StatsDClient statsd = new NonBlockingStatsDClient("my.prefix", "statsd-host", 8125, this);
@Override
public void onEnable() {
statsd.incrementCounter("bar");
statsd.recordGaugeValue("baz", 100);
statsd.recordExecutionTime("bag", 25);
statsd.recordSetEvent("qux", "one");
}
}