From 7add723a859fdfe9d67c400b0af70551f375ace8 Mon Sep 17 00:00:00 2001 From: Mignonne Patterson <204300311+Mignonne-Patterson@users.noreply.github.com> Date: Tue, 28 Oct 2025 07:53:00 +0000 Subject: [PATCH] Update persistence/retry.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- persistence/retry.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/persistence/retry.go b/persistence/retry.go index cbdd8d6c9..80a8805d3 100644 --- a/persistence/retry.go +++ b/persistence/retry.go @@ -59,6 +59,7 @@ func RetryWithBackoff(ctx context.Context, operation string, op func() error, ma select { case <-time.After(jitter): + metrics.ObserveSQLiteLockWait(operation, jitter.Seconds()) case <-ctx.Done(): return ctx.Err() } @@ -66,8 +67,6 @@ func RetryWithBackoff(ctx context.Context, operation string, op func() error, ma delay *= 2 } - // Record final wait duration for the operation - metrics.ObserveSQLiteLockWait(operation, time.Since(startTime).Seconds()) return lastErr }