forked from TrueCloudLab/frostfs-node
[#1484] engine: Fix engine metrics
1. Add forgotten metrics for client requests 2. Include execIfNotBlocked into metrics Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
ad01fb958a
commit
8a57c78f5f
9 changed files with 25 additions and 26 deletions
|
@ -56,6 +56,7 @@ func (e *StorageEngine) Get(ctx context.Context, prm GetPrm) (res GetRes, err er
|
|||
attribute.String("address", prm.addr.EncodeToString()),
|
||||
))
|
||||
defer span.End()
|
||||
defer elapsed("Get", e.metrics.AddMethodDuration)()
|
||||
|
||||
err = e.execIfNotBlocked(func() error {
|
||||
res, err = e.get(ctx, prm)
|
||||
|
@ -66,8 +67,6 @@ func (e *StorageEngine) Get(ctx context.Context, prm GetPrm) (res GetRes, err er
|
|||
}
|
||||
|
||||
func (e *StorageEngine) get(ctx context.Context, prm GetPrm) (GetRes, error) {
|
||||
defer elapsed("Get", e.metrics.AddMethodDuration)()
|
||||
|
||||
errNotFound := new(apistatus.ObjectNotFound)
|
||||
|
||||
var shPrm shard.GetPrm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue