Documentation
¶
Overview ¶
Package metrics provides Prometheus instrumentation for Goque task queue operations. It includes counters, gauges, and histograms for tracking task processing, worker pools, retry attempts, payload sizes, and operation durations.
Index ¶
- func IncProcessingTasks(taskType entity.TaskType, status entity.TaskStatus)
- func SetOperationsTotal(taskType entity.TaskType, operations entity.TaskProcessingOperations, ...)
- func SetServiceName(name string)
- func SetTaskPayloadSize(taskType entity.TaskType, size int)
- func SetTaskRetryAttempts(taskType entity.TaskType, retryAttempts int32)
- func SetTasksWorkersTotal(taskType entity.TaskType, count int)
- func TaskProcessingDurationSecondsObserver(taskType entity.TaskType, operations entity.TaskProcessingOperations) prometheus.Observer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncProcessingTasks ¶
func IncProcessingTasks(taskType entity.TaskType, status entity.TaskStatus)
IncProcessingTasks increments the counter of processed tasks for the given task type and status.
func SetOperationsTotal ¶
func SetOperationsTotal(taskType entity.TaskType, operations entity.TaskProcessingOperations, count int)
SetOperationsTotal adds to the counter of operations performed for a task type.
func SetServiceName ¶
func SetServiceName(name string)
SetServiceName sets the service name label for all metrics.
func SetTaskPayloadSize ¶
SetTaskPayloadSize records the size of the task payload in bytes.
func SetTaskRetryAttempts ¶
SetTaskRetryAttempts records the number of retry attempts for a task.
func SetTasksWorkersTotal ¶
SetTasksWorkersTotal sets the current number of active workers for a task type.
func TaskProcessingDurationSecondsObserver ¶
func TaskProcessingDurationSecondsObserver(taskType entity.TaskType, operations entity.TaskProcessingOperations) prometheus.Observer
TaskProcessingDurationSecondsObserver returns an observer for recording task processing duration.
Types ¶
This section is empty.