Class FastStatsTelemetry

java.lang.Object
com.enhancedechest.telemetry.FastStatsTelemetry
All Implemented Interfaces:
Telemetry

public final class FastStatsTelemetry extends Object implements Telemetry
FastStats-backed Telemetry: one BukkitContext carrying custom metrics and error tracking. Built through create(org.bukkit.plugin.java.JavaPlugin, com.enhancedechest.config.PluginConfig), which falls back to Telemetry.NOOP when no token was baked in at build time or the SDK fails to start — so the rest of the plugin never branches.

The metric suppliers are invoked by the SDK off-thread on its own submission schedule; they only read immutable PluginConfig fields, so they are thread-safe and never touch platform state, per FastStats supplier rules.

  • Field Summary

    Fields inherited from interface com.enhancedechest.telemetry.Telemetry

    NOOP
  • Method Summary

    Modifier and Type
    Method
    Description
    static Telemetry
    create(org.bukkit.plugin.java.JavaPlugin plugin, PluginConfig config)
    Builds the FastStats-backed telemetry, or Telemetry.NOOP when the build-time token is absent (see faststats.properties) or SDK startup throws — telemetry must never be able to take the plugin down.
    void
    error(Throwable error, String where)
    Reports a handled-but-noteworthy failure (codec corruption, DB save failure, …) to error tracking, alongside the existing log line — never instead of it.
    void
    Flushes and stops the backing service.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static Telemetry create(org.bukkit.plugin.java.JavaPlugin plugin, PluginConfig config)
      Builds the FastStats-backed telemetry, or Telemetry.NOOP when the build-time token is absent (see faststats.properties) or SDK startup throws — telemetry must never be able to take the plugin down.
    • error

      public void error(Throwable error, String where)
      Description copied from interface: Telemetry
      Reports a handled-but-noteworthy failure (codec corruption, DB save failure, …) to error tracking, alongside the existing log line — never instead of it. where is a short static label (e.g. "chest.save-db") used to group reports; never put player data in it. Uncaught exceptions are captured automatically and do not need this call.
      Specified by:
      error in interface Telemetry
    • shutdown

      public void shutdown()
      Description copied from interface: Telemetry
      Flushes and stops the backing service. Called once from onDisable.
      Specified by:
      shutdown in interface Telemetry