AstralAnalytics Overview
AstralAnalytics is the event-collection pipeline for AstralRealms. Each game server and the proxy emit small typed events (player_join, command_execute, luckperms-promote, …) to a central master service that stores them in PostgreSQL. Metabase reads from the same database to power dashboards.
What it does
Collects events from Paper servers, the Velocity proxy, MageHic services, and any other plugin that calls the shared
AnalyticsServiceinterface.Routes them over a single RabbitMQ exchange (
analytics.events) using a compact binary packet.Enriches events with geo data — payloads carrying an
ipfield get acountryISO code appended via ip-api.com.Stores every event as a row in the
eventstable with aJSONB payload.Visualises through Metabase. A
docker-compose.ymlboots Postgres + Metabase with one command.
Modules
AstralAnalytics is a multi-module Maven project:
Module | Runs on | Purpose |
|---|---|---|
| every host | Shared packet ( |
| every Paper server | Bukkit plugin: registers the messaging service, the AnalyticsService, listeners for join/quit/commands, the |
| the Velocity proxy | Velocity plugin: collects richer first-touch data (client brand, mod info, settings, IP). |
| a dedicated MageHic node | Consumes the |
Architecture at a glance
Requirements
Dependency | Required | Notes |
|---|---|---|
Paper 1.21+ / Velocity 3.4+ | Per module | — |
AstralCore | Yes | Messaging, plugin lifecycle, |
RabbitMQ | Yes | Single exchange |
PostgreSQL 15+ | Master only |
|
Metabase | Optional | Visualisation; bundled |
LuckPerms | Optional | When present on a Paper server, promote/demote events are auto-tracked. |
What you'd typically use it for
Login funnel and player retention curves.
Cross-server playtime aggregation.
Country / locale / client-brand distribution.
Command usage telemetry.
Custom feature instrumentation through the
track-eventaction or theAnalyticsServiceAPI in your own plugin.