Package io.deephaven.process.telemetry
Interface TelemetryService
public interface TelemetryService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(io.deephaven.process.telemetry.TelemetryEvent newEvent) Used to hand off a new event for proper processingstatic booleanenabledFor(String whom) Provides simple way to determine if Telemetry logging should be enabled for a specific classstatic StringGets the current date in a consistent formatstatic StringgetLoggerPath(String source, String date) Gets a full-path to a binlog file, to which we may appendstatic TelemetryServiceReturns an appropriate TelemetryService instance, which will properly manage remote-logging of TelemetryEventslongnextId()Gets the next unique-id to be used an identifier for the life of this processvoidonControllerUpdate(boolean isConnected) Allows the Controller-aware object to notify the TelemetryService of availability/unavailability of the CARQ based on the status of the helper PQdefault booleanProvides simple way to identify if a particular TelemetryService instance will log events remotelyvoidsetExecutionHandler(BiConsumer<ContextAwareRemoteQuery<Exception>, Consumer<Exception>> remoteExecutor) Establishes link between a TelemetryService instance and a Controller-aware object
-
Field Details
-
TELEMETRY_PROPERTY
- See Also:
-
LOGGER_PARAM
- See Also:
-
DATE_PARAM
- See Also:
-
CONFIG
static final com.fishlib.configuration.Configuration CONFIG -
REMOTE_TELEMETRY
static final boolean REMOTE_TELEMETRY
-
-
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
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
Returns an appropriate TelemetryService instance, which will properly manage remote-logging of TelemetryEvents- Returns:
- an appropriate TelemetryService instance
-
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 datadate- the date for the data- Returns:
- full-path to a binlog file
- Throws:
IOException- the default binlog directory is not properly created
-