Interface TelemetryItem


public interface TelemetryItem
A representation of an item to be tracked by the Telemetry process. The TelemetryItem may be written to a local logfile and/or to a remote table, depending on implementation specifics. Each TelemetryItem may have on or more "updates", which (if tracked) will include duration since the creation of the TelemetryItem
  • Method Details

    • log

      TelemetryItem log​(com.fishlib.io.log.LogLevel level, @NotNull String status, @Nullable Exception reason)
      Logs a telemetry-event. The event may be written to a local logfile and/or remote telemetry-table, depending on implementation specifics
      Parameters:
      level - LogLevel to use for local logs
      status - most recent status of a telemetry-item
      reason - an optional exception
      Returns:
      the instance of the telemetry-item
    • loggedCnt

      default int loggedCnt()
      Returns the current number of events logged by this TelemetryItem, if tracked by an overriding implementation
      Returns:
      the number of events logged by this TelemetryItem, if tracked by an overriding implementation
    • log

      default TelemetryItem log​(com.fishlib.io.log.LogLevel level, String status)
      Parameters:
      level - LogLevel to use for local logs
      status - most recent status of a telemetry-item
      Returns:
      the instance of the telemetry-item
    • fatal

      default TelemetryItem fatal​(String status)
      Helper-method for LogLevel.FATAL events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      Returns:
      the instance of the telemetry-item
    • fatal

      default TelemetryItem fatal​(String status, Exception reason)
      Helper-method for LogLevel.FATAL events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      reason - an optional exception
      Returns:
      the instance of the telemetry-item
    • error

      default TelemetryItem error​(String status)
      Helper-method for LogLevel.ERROR events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      Returns:
      the instance of the telemetry-item
    • error

      default TelemetryItem error​(String status, Exception reason)
      Helper-method for LogLevel.ERROR events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      reason - an optional exception
      Returns:
      the instance of the telemetry-item
    • warn

      default TelemetryItem warn​(String status)
      Helper-method for LogLevel.WARN events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      Returns:
      the instance of the telemetry-item
    • warn

      default TelemetryItem warn​(String status, Exception reason)
      Helper-method for LogLevel.WARN events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      reason - an optional exception
      Returns:
      the instance of the telemetry-item
    • info

      default TelemetryItem info​(String status)
      Helper-method for LogLevel.INFO events; see log(LogLevel, String, Exception)
      Parameters:
      status - most recent status of a telemetry-item
      Returns:
      the instance of the telemetry-item