Merge branch '15209-python-arv-deps-pinned'
[arvados.git] / services / keepstore / s3_volume.go
index 0bf0d9a10e3241e375f6abc070e27260fb4d698e..4c39dcd5c4f12fc9a8b8ad36d165545af952fb7a 100644 (file)
@@ -199,7 +199,7 @@ func (*S3Volume) Type() string {
 
 // Start populates private fields and verifies the configuration is
 // valid.
-func (v *S3Volume) Start(opsCounters, errCounters, ioBytes *prometheus.CounterVec) error {
+func (v *S3Volume) Start(vm *volumeMetricsVecs) error {
        region, ok := aws.Regions[v.Region]
        if v.Endpoint == "" {
                if !ok {
@@ -251,9 +251,7 @@ func (v *S3Volume) Start(opsCounters, errCounters, ioBytes *prometheus.CounterVe
        }
        // Set up prometheus metrics
        lbls := prometheus.Labels{"device_id": v.DeviceID()}
-       v.bucket.stats.opsCounters = opsCounters.MustCurryWith(lbls)
-       v.bucket.stats.errCounters = errCounters.MustCurryWith(lbls)
-       v.bucket.stats.ioBytes = ioBytes.MustCurryWith(lbls)
+       v.bucket.stats.opsCounters, v.bucket.stats.errCounters, v.bucket.stats.ioBytes = vm.getCounterVecsFor(lbls)
 
        return nil
 }