[#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:
Dmitrii Stepanov 2024-11-11 12:46:55 +03:00
parent ad01fb958a
commit 8a57c78f5f
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0
9 changed files with 25 additions and 26 deletions

View file

@ -56,6 +56,7 @@ func (e *StorageEngine) Put(ctx context.Context, prm PutPrm) (err error) {
attribute.String("address", object.AddressOf(prm.Object).EncodeToString()),
))
defer span.End()
defer elapsed("Put", e.metrics.AddMethodDuration)()
err = e.execIfNotBlocked(func() error {
err = e.put(ctx, prm)
@ -66,8 +67,6 @@ func (e *StorageEngine) Put(ctx context.Context, prm PutPrm) (err error) {
}
func (e *StorageEngine) put(ctx context.Context, prm PutPrm) error {
defer elapsed("Put", e.metrics.AddMethodDuration)()
addr := object.AddressOf(prm.Object)
// In #1146 this check was parallelized, however, it became