Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Liu <jliu@gitlab.com>2023-11-21 03:38:49 +0300
committerJames Liu <jliu@gitlab.com>2023-11-23 02:46:32 +0300
commit102abfbebf12903bd412995a8b14f091f25f06d2 (patch)
tree91c6897d77e59cce01fc50ca62e04400e1a91add
parent9e1adc6109b698e271f56f9e476a672acdf2cb9d (diff)
backup: Instrument bundle write
Adds instrumentation such that the total bundle size written to object storage is observed at the conclusion of the backup.
-rw-r--r--internal/backup/backup.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/backup/backup.go b/internal/backup/backup.go
index 3bacb2d1c..3abb42a08 100644
--- a/internal/backup/backup.go
+++ b/internal/backup/backup.go
@@ -404,6 +404,7 @@ func (mgr *Manager) writeBundle(ctx context.Context, repo Repository, step *Step
return mgr.sink.GetWriter(ctx, step.BundlePath)
})
defer func() {
+ backupBundleSize.Observe(float64(w.BytesWritten()))
if err := w.Close(); err != nil && returnErr == nil {
returnErr = fmt.Errorf("write bundle: %w", err)
}