From bda11a9e47294e3577072d086432884556065ad1 Mon Sep 17 00:00:00 2001 From: "Pavel Tumik @ GitPod" <18602811+sagor999@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:05:35 -0700 Subject: [PATCH] add addional tracing for remoteContentStorage Download fn --- components/ws-daemon/pkg/content/initializer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/ws-daemon/pkg/content/initializer.go b/components/ws-daemon/pkg/content/initializer.go index 9e7e42c12caa5d..e6e87339cc6852 100644 --- a/components/ws-daemon/pkg/content/initializer.go +++ b/components/ws-daemon/pkg/content/initializer.go @@ -379,11 +379,17 @@ func (rs *remoteContentStorage) EnsureExists(ctx context.Context) error { // Download always returns false and does nothing func (rs *remoteContentStorage) Download(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (exists bool, err error) { + span, ctx := opentracing.StartSpanFromContext(ctx, "remoteContentStorage.Download") + span.SetTag("destination", destination) + span.SetTag("name", name) + defer tracing.FinishSpan(span, &err) + info, exists := rs.RemoteContent[name] if !exists { return false, nil } + span.SetTag("URL", info.URL) resp, err := http.Get(info.URL) if err != nil { return true, err