swarm: fix relationship between spans in open tracing (#19236)
* swarm/network: propagate span with ctx * swarm/network: try to stop stream.send.request spans on time * swarm/storage: add chunk ref as a log to netstore.fetcher span
This commit is contained in:
committed by
Viktor Trón
parent
ceeb047e69
commit
2cfe0bed9f
@ -28,6 +28,7 @@ import (
|
||||
"github.com/ethereum/go-ethereum/swarm/log"
|
||||
"github.com/ethereum/go-ethereum/swarm/spancontext"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
olog "github.com/opentracing/opentracing-go/log"
|
||||
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
)
|
||||
@ -215,6 +216,8 @@ func (n *NetStore) getOrCreateFetcher(ctx context.Context, ref Address) *fetcher
|
||||
cctx,
|
||||
"netstore.fetcher",
|
||||
)
|
||||
|
||||
sp.LogFields(olog.String("ref", ref.String()))
|
||||
fetcher := newFetcher(sp, ref, n.NewNetFetcherFunc(cctx, ref, peers), destroy, peers, n.closeC)
|
||||
n.fetchers.Add(key, fetcher)
|
||||
|
||||
|
Reference in New Issue
Block a user