Skip to content

spark ​

collector-spark · version 0.6.0 · registers as spark · CI 2026-09-25

The spark poll.

Scrape mode, not background: everything spark exposes is already computed and cached by it, poll() just reads a field. This is the cheapest collector in the plugin.

Two versions of the API coexist on this network, and that drives how this class is written:

  • the lobby carries the one Paper embeds, 0.1-20240720 — tps, mspt, cpuProcess, cpuSystem, gc, and nothing else;

  • the proxy carries spark 1.10.187's, which adds memoryAllocation() and playerPing().

Hence two rules. Windows are discovered via getWindows() instead of being named: StatisticWindow.MemoryAllocation doesn't exist on the Paper side, and merely referencing that class was enough to make the module fail with a NoClassDefFoundError — observed. And the two recent methods go through reflection, which here is the honest choice rather than a workaround: the clean solution would be to compile two modules, one per API version, for two metrics.

Install ​

Put vania-metrics-collector-spark-0.6.0.jar in the plugins folder, next to the core and to spark, then restart. The collector depends on both: without spark it stays disabled, and the core keeps running.

  • Target plugin: spark spark-api 0.1-20240720.200737-2 (the API Paper bundles) — latest for Minecraft 1.21.11: 1.10.187
  • Built against: core v0.6.0
  • Download: vania-metrics-collector-spark-0.6.0.jar, with its SHA-512, from the v0.6.0 release
  • Collects: on events, as they happen
  • Tested on: Java 21
  • Latest CI: success · 2026-09-25 21:36 UTC · commit e12621d · run

Platforms ​

PlatformTarget pluginCollectorLatest CI
PaperbundledPassedpaper ✓
PurpurbundledPassedpurpur ✓
FoliabundledPassedfolia ✓
SpigotyesPassedspigot ✓
CraftBukkityesPassedbukkit ✓
SpongeunknownUnknown—
VelocityyesPassedvelocity-3.5.1 ✓ · velocity-4.2.1 ✓
BungeeCordyesPassedbungeecord ✓
WaterfallyesPassedwaterfall ✓
GeyserunknownUnknown—

See the compatibility matrix for every collector at once.

Metrics ​

mc_spark_allocation_bytes_per_second ​

gauge window quantile

Memory allocation rate. It's not the memory that's OCCUPIED that causes stutters, it's the rate at which it's requested: every gigabyte allocated ends up collected, hence a micro-pause.

mc_spark_cpu_ratio ​

gauge source window

CPU load, from 0 to 1. source = process|system.

mc_spark_gc_average_frequency_seconds ​

gauge gc

Average time between two collections. Short = the heap fills up fast.

mc_spark_gc_average_seconds ​

gauge gc

Average duration of a collection, per garbage collector.

mc_spark_player_ping_seconds ​

gauge window quantile

Player ping aggregated by spark. quantile = min|mean|median|p95|max.

mc_spark_tick_duration_seconds ​

gauge window quantile

Tick duration as seen by spark. quantile = min|mean|median|p95|max. Gauges frozen on spark's windows: for a real histogram, see mc_tick_duration_seconds.

mc_spark_tps ​

gauge window

TPS as seen by spark. window = 5s|10s|1m|5m|15m.

Configuration ​

In metrics.properties, or as environment variables. See Configuration.

KeyDefaultEnvironment variable
collector.sparktrueVANIA_METRICS_COLLECTOR_SPARK

Minecraft 1.21.11 · core 0.6.0 · rebuilt after every CI run