rcd: fix incorrect prometheus metrics - fixes #4341
This was caused by using the stats group from the context passed in by the rcd rather than the global stats group. Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
parent
f4d7e41f24
commit
763944f673
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ func (c *RcloneCollector) Describe(ch chan<- *prometheus.Desc) {
|
|||
|
||||
// Collect is part of the Collector interface: https://godoc.org/github.com/prometheus/client_golang/prometheus#Collector
|
||||
func (c *RcloneCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
s := GlobalStats()
|
||||
s := groups.sum()
|
||||
s.mu.RLock()
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(c.bytesTransferred, prometheus.CounterValue, float64(s.bytes))
|
||||
|
|
Loading…
Reference in a new issue