Tracking with Maps
Outline
Section titled “Outline”Tracking with maps is the easiest way to start tracking custom events with Hoglin. As the name suggests, we construct
our event parameters using a map of key-value pairs, where the keys are strings and the values can be of any type as
long as they can be serialized - see the Custom Types and Serializers
guide if you’d like to add or modify serialization for specific types. The name of the event itself is passed in
separately as a string. Usage: Hoglin#track(String eventName, Map<String, Object> parameters).
Full code example
Section titled “Full code example”Hoglin hoglin = /** Your Hoglin instance */;hoglin.track("player_join", Map.of( "player_uuid", UUID.randomUUID(), "hostname", "example.com", "isBedrock", false));val hoglin = /** Your Hoglin instance */hoglin.track("player_join", mapOf( "player_uuid" to UUID.randomUUID(), "hostname" to "example.com", "isBedrock" to false))After executing this, the event will be tracked in the event queue and sent off to Hoglin when the next auto-flush (or manual flush) is carried out.
Looking back at the dashboard
Section titled “Looking back at the dashboard”After an event has been pushed to Hoglin, you should be able to see it update in real-time on the Hoglin dashboard. Looking at the table view for the example above, you’ll see an event that looks something like this:

You can do a lot more with your data, visualizing and aggregating it in various ways, follow this guide to learn more about Exploring Your Data in the Hoglin dashboard.