TopStats SDK

Java analytics SDK

Deliberately Java 8 compatible so it runs everywhere from a 1.8.8 Minecraft server to a modern Spring Boot deployment. Builder-style options, a daemon flusher thread, and jackson-databind as the only dependency. The jvm-web module adds servlet filters and a Spring Boot starter.

Install

// Maven Central soon; today: mvn install from the repo
<dependency>
  <groupId>gg.topstats</groupId>
  <artifactId>analytics</artifactId>
</dependency>

Capture your first event

TopStatsClient client = new TopStatsClient(System.getenv("TOPSTATS_API_KEY"),
    new TopStatsClientOptions().defaultSource("api"));

client.capture("batch_completed", Map.of("rows", 1200),
    new CaptureContext().actor("job-42"));
client.shutdown();

Behaviour you can rely on

Every other language

Your first event is minutes away.

Twelve language SDKs, middleware for nine web frameworks, plugins for seven games, and raw HTTP - all working today. Free plan, 2M events a month, no card.