Class TaskReactorTelemetry
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.telemetry.TaskReactorTelemetry
-
public class TaskReactorTelemetry extends Object
Telemetry utility for Task Reactor.
-
-
Constructor Summary
Constructors Constructor Description TaskReactorTelemetry()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddWorkerIdleTimeEvent(Instant startTime, Instant endTime)Adds a new event for the worker idle time.static voidaddWorkerStatusEvent(Map<String,Integer> statuses)Adds a new event which contains the number of workers in each worker status.static voidaddWorkerWorkingTimeEvent(Instant startTime, Instant endTime)Adds a new event for the worker working time.static voidaddWorkItemsNumberInQueueEvent(long number, Identifier instanceName)Adds a new event for the number of work items present in a dispatcher queue.static voidaddWorkItemWaitingInQueueTimeEvent(Timestamp startTime, Instant endTime)Adds a new event for the time of work item waiting in a dispatcher queue.static voidsetTaskReactorInstanceNameSpanAttribute(Identifier value)Sets the value of the Task Reactor instance name span attribute.static voidsetWorkerIdSpanAttribute(WorkerId workerId)Sets the value of the worker id span attribute.
-
-
-
Method Detail
-
setTaskReactorInstanceNameSpanAttribute
public static void setTaskReactorInstanceNameSpanAttribute(Identifier value)
Sets the value of the Task Reactor instance name span attribute.- Parameters:
value- attribute value
-
setWorkerIdSpanAttribute
public static void setWorkerIdSpanAttribute(WorkerId workerId)
Sets the value of the worker id span attribute.- Parameters:
workerId- attribute value
-
addWorkerIdleTimeEvent
public static void addWorkerIdleTimeEvent(Instant startTime, Instant endTime)
Adds a new event for the worker idle time.- Parameters:
startTime- idle start timeendTime- idle end time
-
addWorkerWorkingTimeEvent
public static void addWorkerWorkingTimeEvent(Instant startTime, Instant endTime)
Adds a new event for the worker working time.- Parameters:
startTime- working start timeendTime- working end time
-
addWorkItemWaitingInQueueTimeEvent
public static void addWorkItemWaitingInQueueTimeEvent(Timestamp startTime, Instant endTime)
Adds a new event for the time of work item waiting in a dispatcher queue.- Parameters:
startTime- time when a work item was inserted to a dispatcher queueendTime- time when a work item was removed from a dispatcher queue and inserted to worker queue
-
addWorkItemsNumberInQueueEvent
public static void addWorkItemsNumberInQueueEvent(long number, Identifier instanceName)Adds a new event for the number of work items present in a dispatcher queue.- Parameters:
number- number of work itemsinstanceName- Task Reactor instance name
-
addWorkerStatusEvent
public static void addWorkerStatusEvent(Map<String,Integer> statuses)
Adds a new event which contains the number of workers in each worker status. The event contains also an additional field which presents the total number of workers.- Parameters:
statuses- number of workers for each status which should be logged
-
-