mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-27 16:49:17 -04:00
initialize fields with 0
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
1 parent
ebd674564c
commit
24d01226d3
1 file changed
+4
@@ -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