diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2019-03-11 18:45:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 18:45:34 +0800 |
commit | 1a3e25e4c11d09aabd77402585412f1577251f49 (patch) | |
tree | e302704e62d65606497e6fc4d1eaf791bde5251d /swarm/storage | |
parent | 9a58a9b91a9bb60be2768aea451576135fa7ebe0 (diff) | |
download | go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar.gz go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar.bz2 go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar.lz go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar.xz go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.tar.zst go-tangerine-1a3e25e4c11d09aabd77402585412f1577251f49.zip |
swarm: tracing improvements (#19249)
Diffstat (limited to 'swarm/storage')
-rw-r--r-- | swarm/storage/netstore.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go index cb6c1c9cf..e3845489e 100644 --- a/swarm/storage/netstore.go +++ b/swarm/storage/netstore.go @@ -103,6 +103,14 @@ func (n *NetStore) Get(rctx context.Context, ref Address) (Chunk, error) { return nil, err } if chunk != nil { + // this is not measuring how long it takes to get the chunk for the localstore, but + // rather just adding a span for clarity when inspecting traces in Jaeger, in order + // to make it easier to reason which is the node that actually delivered a chunk. + _, sp := spancontext.StartSpan( + rctx, + "localstore.get") + defer sp.Finish() + return chunk, nil } return fetch(rctx) |