Interface TelemetryService


public interface TelemetryService
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.fishlib.configuration.Configuration
     
    static final String
     
    static final String
     
    static final boolean
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEvent(io.deephaven.process.telemetry.TelemetryEvent newEvent)
    Used to hand off a new event for proper processing
    static boolean
    Provides simple way to determine if Telemetry logging should be enabled for a specific class
    static String
    Gets the current date in a consistent format
    static String
    getLoggerPath(String source, String date)
    Gets a full-path to a binlog file, to which we may append
    Returns an appropriate TelemetryService instance, which will properly manage remote-logging of TelemetryEvents
    long
    Gets the next unique-id to be used an identifier for the life of this process
    void
    onControllerUpdate(boolean isConnected)
    Allows the Controller-aware object to notify the TelemetryService of availability/unavailability of the CARQ based on the status of the helper PQ
    default boolean
    Provides simple way to identify if a particular TelemetryService instance will log events remotely
    void
    Establishes link between a TelemetryService instance and a Controller-aware object
  • Field Details

  • Method Details

    • addEvent

      void addEvent(@NotNull io.deephaven.process.telemetry.TelemetryEvent newEvent)
      Used to hand off a new event for proper processing
      Parameters:
      newEvent - a new event for this TelemetryService instance to handle
    • nextId

      long nextId()
      Gets the next unique-id to be used an identifier for the life of this process
      Returns:
      the next unique-id for the life of this process
    • onControllerUpdate

      void onControllerUpdate(boolean isConnected)
      Allows the Controller-aware object to notify the TelemetryService of availability/unavailability of the CARQ based on the status of the helper PQ
      Parameters:
      isConnected - if the helper PQ is available to handle incoming CARQs
    • setExecutionHandler

      void setExecutionHandler(BiConsumer<ContextAwareRemoteQuery<Exception>,Consumer<Exception>> remoteExecutor)
      Establishes link between a TelemetryService instance and a Controller-aware object
      Parameters:
      remoteExecutor - a method which will execute a CARQ. If there is any Exception during attempted execution of the CARQ, the method will call back to the given Exception-Consumer
    • remoteEnabled

      default boolean remoteEnabled()
      Provides simple way to identify if a particular TelemetryService instance will log events remotely
      Returns:
      if the instance will log events remotely
    • enabledFor

      static boolean enabledFor(@NotNull String whom)
      Provides simple way to determine if Telemetry logging should be enabled for a specific class
      Parameters:
      whom - a string identifying a class, which may have a "Telemetry.enableFor.${whom}" property defined
      Returns:
      the configuration value, if defined. Defaults to `true`
    • getService

      @NotNull static TelemetryService getService()
      Returns an appropriate TelemetryService instance, which will properly manage remote-logging of TelemetryEvents
      Returns:
      an appropriate TelemetryService instance
    • getCurrentDate

      @NotNull static String getCurrentDate()
      Gets the current date in a consistent format
      Returns:
      the current date
    • getLoggerPath

      @NotNull static String getLoggerPath(@NotNull String source, @NotNull String date) throws IOException
      Gets a full-path to a binlog file, to which we may append
      Parameters:
      source - the source of the data
      date - the date for the data
      Returns:
      full-path to a binlog file
      Throws:
      IOException - the default binlog directory is not properly created