Interface Telemetry

All Known Implementing Classes:
FastStatsTelemetry

public interface Telemetry
Plugin-facing telemetry facade. Call sites stay one-liners and never know whether FastStats is active — when no project token was baked in at build time (or init fails) the NOOP instance is wired instead, so error reporting costs nothing. This interface is the only telemetry type the rest of the plugin may depend on; everything dev.faststats stays inside FastStatsTelemetry.

Implementations must be thread-safe: reports fire from region threads, the global bookkeeping thread and the async DB executor alike.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Telemetry
    Shared inert instance used when telemetry is disabled.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Field Details

    • NOOP

      static final Telemetry NOOP
      Shared inert instance used when telemetry is disabled.
  • Method Details

    • error

      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. 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.
    • shutdown

      void shutdown()
      Flushes and stops the backing service. Called once from onDisable.