Skip to content

Commit 1537260

Browse files
sagor999roboquat
authored andcommitted
add addional tracing for remoteContentStorage Download fn
1 parent 01fda65 commit 1537260

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/ws-daemon/pkg/content/initializer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,17 @@ func (rs *remoteContentStorage) EnsureExists(ctx context.Context) error {
379379

380380
// Download always returns false and does nothing
381381
func (rs *remoteContentStorage) Download(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (exists bool, err error) {
382+
span, ctx := opentracing.StartSpanFromContext(ctx, "remoteContentStorage.Download")
383+
span.SetTag("destination", destination)
384+
span.SetTag("name", name)
385+
defer tracing.FinishSpan(span, &err)
386+
382387
info, exists := rs.RemoteContent[name]
383388
if !exists {
384389
return false, nil
385390
}
386391

392+
span.SetTag("URL", info.URL)
387393
resp, err := http.Get(info.URL)
388394
if err != nil {
389395
return true, err

0 commit comments

Comments
 (0)