mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
Add metrics for the postprocessing duration
This commit is contained in:
@@ -22,6 +22,7 @@ type Metrics struct {
|
||||
EventsRedelivered prometheus.Gauge
|
||||
InProgress prometheus.Gauge
|
||||
Finished *prometheus.CounterVec
|
||||
Duration *prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// New initializes the available metrics.
|
||||
@@ -63,6 +64,13 @@ func New() *Metrics {
|
||||
Name: "finished",
|
||||
Help: "Number of finished postprocessing events",
|
||||
}, []string{"status"}),
|
||||
Duration: promauto.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: Namespace,
|
||||
Subsystem: Subsystem,
|
||||
Name: "duration_seconds",
|
||||
Help: "Duration of postprocessing operations in seconds",
|
||||
Buckets: []float64{0.1, 0.5, 1, 2.5, 5, 10, 30, 60, 120, 300, 600, 1200},
|
||||
}, []string{"status"}),
|
||||
}
|
||||
|
||||
return m
|
||||
|
||||
Reference in New Issue
Block a user