Skip to content

minotopiame/bungee-statsd-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bungee-statsd-client

Build Status

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.

Downloads

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>

Usage

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

About

a java statsd client library, adopted for use with BungeeCord

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%