// 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 {
}
// 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
}