metrics

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricQueueEnqueueTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_enqueue_total",
		Help:      "Total number of actual data pushed to queue.",
	}, []string{queueName})

	MetricQueueEnqueueErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_enqueue_error_total",
		Help:      "Total number of actual data pushed to queue failed.",
	}, []string{queueName})

	MetricQueueDequeueTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_dequeue_total",
		Help:      "Total number of actual data poped from queue.",
	}, []string{queueName})

	MetricQueueDequeueErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_dequeue_error_total",
		Help:      "Total number of actual data poped from queue failed.",
	}, []string{queueName})

	MetricQueueHandleErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_handle_error_total",
		Help:      "Total number of actual data for handling error",
	}, []string{queueName})

	MetricQueueHandleSuccessulTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_handle_successful_total",
		Help:      "Total number of actual data for handling successful",
	}, []string{queueName})

	MetricQueueRecoverTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_recover_total",
		Help:      "Total number of actual data for recovering",
	}, []string{queueName})

	MetricQueueRecoverSuccessulTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_recover_successful_total",
		Help:      "Total number of actual data for recovering successful",
	}, []string{queueName})

	MetricQueueRecoverErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_recover_error_total",
		Help:      "Total number of actual data for recovering failed",
	}, []string{queueName})

	MetricQueuePurgeTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_purge_total",
		Help:      "Total number of actual data for purging",
	}, []string{queueName})

	MetricQueuePurgeSuccessulTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_purge_successful_total",
		Help:      "Total number of actual data for purging successful",
	}, []string{queueName})

	MetricQueuePurgeErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceQueue,
		Name:      "queue_purge_error_total",
		Help:      "Total number of actual data for purging failed",
	}, []string{queueName})

	MetricQueueHandleDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: namespaceQueue,
		Name:      "queue_handle_duration_seconds",
		Help:      "Duration of handling for a queue.",
		Buckets: []float64{
			0.001,
			0.005,
			0.01,
			0.025,
			0.05,
			0.1,
			0.25,
			0.5,
			1,
			2.5,
			5,
			10,
			20,
			30,
			60,
			300,
		},
	}, []string{queueName})
)
View Source
var (
	MetricStateStorageOperationTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceState,
		Name:      "storage_operation_total",
		Help:      "Total number of state storage operations.",
	}, []string{stateStorageType, stateStorageOperation})

	MetricStateStorageOperationErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceState,
		Name:      "storage_operation_error_total",
		Help:      "Total number of failures of state storage operations.",
	}, []string{stateStorageType, stateStorageOperation})

	MetricStateStorageOperationDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: namespaceState,
		Name:      "storage_operation_duration_seconds",
		Help:      "Duration of handling for a storage operation.",
		Buckets: []float64{
			0.001,
			0.005,
			0.01,
			0.025,
			0.05,
			0.1,
			0.25,
			0.5,
			1,
			2.5,
			5,
			10,
			20,
			30,
			60,
			300,
		},
	}, []string{stateStorageType, stateStorageOperation})

	MetricStateSnapshotOperationTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceState,
		Name:      "snapshot_operation_total",
		Help:      "Total number of state snapshot operations.",
	}, []string{stateStorageType, stateSnapshotOperation})

	MetricStateSnapshotOperationErrorTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespaceState,
		Name:      "snapshot_operation_error_total",
		Help:      "Total number of failures of state snapshot operations.",
	}, []string{stateStorageType, stateSnapshotOperation})

	MetricStateSnapshotOperationDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: namespaceState,
		Name:      "snapshot_operation_duration_seconds",
		Help:      "Duration of handling for a snapshot operation.",
		Buckets: []float64{
			0.001,
			0.005,
			0.01,
			0.025,
			0.05,
			0.1,
			0.25,
			0.5,
			1,
			2.5,
			5,
			10,
			20,
			30,
			60,
			300,
		},
	}, []string{stateStorageType, stateSnapshotOperation})
)

Functions

This section is empty.

Types

type StateSnapshotOperation added in v0.2.0

type StateSnapshotOperation string
const (
	StateSnapshotOperationSnapshotStates         StateSnapshotOperation = "SnapshotStates"
	StateSnapshotOperationRevertStatesToSnapshot StateSnapshotOperation = "RevertStatesToSnapshot"
	StateSnapshotOperationGetSnapshot            StateSnapshotOperation = "GetSnapshot"
	StateSnapshotOperationGetSnapshotIDs         StateSnapshotOperation = "GetSnapshotIDs"
	StateSnapshotOperationDeleteSnapshot         StateSnapshotOperation = "DeleteSnapshot"
	StateSnapshotOperationClearSnapshots         StateSnapshotOperation = "ClearSnapshots"
)

type StateStorageOperation added in v0.2.0

type StateStorageOperation string
const (
	StateStorageOperationLoadState      StateStorageOperation = "LoadState"
	StateStorageOperationLoadAllStates  StateStorageOperation = "LoadAllStates"
	StateStorageOperationSaveStates     StateStorageOperation = "SaveStates"
	StateStorageOperationClearStates    StateStorageOperation = "ClearStates"
	StateStorageOperationClearAllStates StateStorageOperation = "ClearAllStates"
	StateStorageOperationGetStateIDs    StateStorageOperation = "GetStateIDs"
	StateStorageOperationGetStateNames  StateStorageOperation = "GetStateNames"
)

Jump to

Keyboard shortcuts

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