Skip to content

Commit

Permalink
add addional tracing for remoteContentStorage Download fn
Browse files Browse the repository at this point in the history
  • Loading branch information
sagor999 authored and roboquat committed Sep 27, 2022
1 parent 01fda65 commit 1537260
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/ws-daemon/pkg/content/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1537260

Please sign in to comment.