mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 21:18:19 -05:00
Merge pull request #10137 from dragonchaser/fix-prometheus
initialize prometheus fields with 0
This commit is contained in:
@@ -49,6 +49,10 @@ func New() *Metrics {
|
||||
}, []string{"version"}),
|
||||
}
|
||||
|
||||
// Initialize the metrics with 0
|
||||
m.Requests.WithLabelValues("GET").Add(0)
|
||||
m.Errors.WithLabelValues("GET").Add(0)
|
||||
|
||||
_ = prometheus.Register(m.Requests)
|
||||
_ = prometheus.Register(m.Errors)
|
||||
_ = prometheus.Register(m.Duration)
|
||||
|
||||
Reference in New Issue
Block a user