[#9999] writecache: Add IO tag label to metrics

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2025-02-18 11:55:56 +03:00
parent 66181327c7
commit d884558b2e
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
7 changed files with 29 additions and 24 deletions

View file

@ -4,6 +4,7 @@ import (
"context"
"time"
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/qos"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/common"
storagelog "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/log"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/metaerr"
@ -30,7 +31,7 @@ func (c *cache) Put(ctx context.Context, prm common.PutPrm) (common.PutRes, erro
added := false
storageType := StorageTypeUndefined
defer func() {
c.metrics.Put(time.Since(startedAt), added, storageType)
c.metrics.Put(time.Since(startedAt), added, storageType, qos.IOTagStringFromContext(ctx))
}()
if !c.modeMtx.TryRLock() {