metrics

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 3 Imported by: 0

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

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

func SetTaskPayloadSize(taskType entity.TaskType, size int)

SetTaskPayloadSize records the size of the task payload in bytes.

func SetTaskRetryAttempts

func SetTaskRetryAttempts(taskType entity.TaskType, retryAttempts int32)

SetTaskRetryAttempts records the number of retry attempts for a task.

func SetTasksWorkersTotal

func SetTasksWorkersTotal(taskType entity.TaskType, count int)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL