mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-22 02:47:26 +08:00
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete * 2.1.0 main node rollup
59 lines
1.5 KiB
Go
59 lines
1.5 KiB
Go
package worker
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
var (
|
|
// Worker manager metrics
|
|
workerOperationsTotal = promauto.NewCounterVec(
|
|
prometheus.CounterOpts{
|
|
Namespace: "quilibrium",
|
|
Subsystem: "worker_manager",
|
|
Name: "operations_total",
|
|
Help: "Total number of worker operations",
|
|
},
|
|
// operation: register/allocate/deallocate, status: success/error
|
|
[]string{"operation", "status"},
|
|
)
|
|
|
|
activeWorkersGauge = promauto.NewGauge(
|
|
prometheus.GaugeOpts{
|
|
Namespace: "quilibrium",
|
|
Subsystem: "worker_manager",
|
|
Name: "active_workers",
|
|
Help: "Number of currently active workers",
|
|
},
|
|
)
|
|
|
|
allocatedWorkersGauge = promauto.NewGauge(
|
|
prometheus.GaugeOpts{
|
|
Namespace: "quilibrium",
|
|
Subsystem: "worker_manager",
|
|
Name: "allocated_workers",
|
|
Help: "Number of currently allocated workers",
|
|
},
|
|
)
|
|
|
|
totalStorageGauge = promauto.NewGauge(
|
|
prometheus.GaugeOpts{
|
|
Namespace: "quilibrium",
|
|
Subsystem: "worker_manager",
|
|
Name: "total_storage_bytes",
|
|
Help: "Total storage capacity across all workers",
|
|
},
|
|
)
|
|
|
|
workerOperationDuration = promauto.NewHistogramVec(
|
|
prometheus.HistogramOpts{
|
|
Namespace: "quilibrium",
|
|
Subsystem: "worker_manager",
|
|
Name: "operation_duration_seconds",
|
|
Help: "Duration of worker operations",
|
|
Buckets: prometheus.DefBuckets,
|
|
},
|
|
[]string{"operation"}, // operation: register/allocate/deallocate/lookup
|
|
)
|
|
)
|