Merge branch 'master' into 14988-wb-rails5-upgrade
[arvados.git] / services / keepstore / unix_volume.go
index 8bdbf936293beb41058e7c23897296598c52cf6b..96f458720d38b56b97fa51fd63e76faa798987bf 100644 (file)
@@ -220,7 +220,7 @@ func (v *UnixVolume) Type() string {
 }
 
 // Start implements Volume
-func (v *UnixVolume) Start(opsCounters, errCounters, ioBytes *prometheus.CounterVec) error {
+func (v *UnixVolume) Start(vm *volumeMetricsVecs) error {
        if v.Serialize {
                v.locker = &sync.Mutex{}
        }
@@ -232,9 +232,7 @@ func (v *UnixVolume) Start(opsCounters, errCounters, ioBytes *prometheus.Counter
        }
        // Set up prometheus metrics
        lbls := prometheus.Labels{"device_id": v.DeviceID()}
-       v.os.stats.opsCounters = opsCounters.MustCurryWith(lbls)
-       v.os.stats.errCounters = errCounters.MustCurryWith(lbls)
-       v.os.stats.ioBytes = ioBytes.MustCurryWith(lbls)
+       v.os.stats.opsCounters, v.os.stats.errCounters, v.os.stats.ioBytes = vm.getCounterVecsFor(lbls)
 
        _, err := v.os.Stat(v.Root)