swarm: tracing improvements (#19249)

This commit is contained in:
Anton Evangelatov
2019-03-11 11:45:34 +01:00
committed by GitHub
parent 9a58a9b91a
commit 1a3e25e4c1
5 changed files with 30 additions and 23 deletions

View File

@@ -26,7 +26,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/swarm/storage"
"github.com/ethereum/go-ethereum/swarm/tracing"
"github.com/opentracing/opentracing-go"
olog "github.com/opentracing/opentracing-go/log"
)
const (
@@ -327,7 +327,8 @@ func (f *Fetcher) doRequest(gone chan *enode.ID, peersToSkip *sync.Map, sources
span := tracing.ShiftSpanByKey(spanId)
if span != nil {
defer span.(opentracing.Span).Finish()
span.LogFields(olog.String("finish", "from doRequest"))
span.Finish()
}
}()
return sources, nil