diff options
author | Vishal Tak <vtak@gitlab.com> | 2022-04-28 13:33:13 +0300 |
---|---|---|
committer | Vishal Tak <vtak@gitlab.com> | 2022-05-16 10:44:42 +0300 |
commit | b81fb34509a9e9754e75975ea8152691fa4c9d10 (patch) | |
tree | 18a10c01d5194f40bd46c9663cca1832b74f0f63 /internal/vfs/zip/archive.go | |
parent | 433eb42cb475239fbc9a9af7be4bff01fc2d0a63 (diff) |
Add logs for more visibility in 404s and archive corruption event
Diffstat (limited to 'internal/vfs/zip/archive.go')
-rw-r--r-- | internal/vfs/zip/archive.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/vfs/zip/archive.go b/internal/vfs/zip/archive.go index c44f45ef..0a9ac0d7 100644 --- a/internal/vfs/zip/archive.go +++ b/internal/vfs/zip/archive.go @@ -121,6 +121,9 @@ func (a *zipArchive) readArchive(url string) { a.resource, a.err = httprange.NewResource(ctx, url, a.fs.httpClient) if a.err != nil { + log.WithFields(log.Fields{ + "url": url, + }).WithError(a.err).Infoln("read zip archive request failed") metrics.ZipOpened.WithLabelValues("error").Inc() return } @@ -132,6 +135,9 @@ func (a *zipArchive) readArchive(url string) { }) if a.archive == nil || a.err != nil { + log.WithFields(log.Fields{ + "url": url, + }).WithError(a.err).Infoln("loading zip archive files into memory failed") metrics.ZipOpened.WithLabelValues("error").Inc() return } |