Revert "Revert "Revert "Add disk type to prometheus metrics" (#4777)""

This reverts commit 567d788928.
This commit is contained in:
chrislu
2023-10-03 08:28:52 -07:00
parent 7540d43ee9
commit 6ebe26a765
5 changed files with 9 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ func NewEcVolumeShard(diskType types.DiskType, dirname string, collection string
}
v.ecdFileSize = ecdFi.Size()
stats.VolumeServerVolumeCounter.WithLabelValues(v.Collection, "ec_shards", string(v.DiskType)).Inc()
stats.VolumeServerVolumeCounter.WithLabelValues(v.Collection, "ec_shards").Inc()
return
}
@@ -88,7 +88,7 @@ func (shard *EcVolumeShard) Close() {
func (shard *EcVolumeShard) Destroy() {
os.Remove(shard.FileName() + ToExt(int(shard.ShardId)))
stats.VolumeServerVolumeCounter.WithLabelValues(shard.Collection, "ec_shards", string(shard.DiskType)).Dec()
stats.VolumeServerVolumeCounter.WithLabelValues(shard.Collection, "ec_shards").Dec()
}
func (shard *EcVolumeShard) ReadAt(buf []byte, offset int64) (int, error) {