aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage
diff options
context:
space:
mode:
authorAnton Evangelatov <anton.evangelatov@gmail.com>2019-05-15 21:06:57 +0800
committerGitHub <noreply@github.com>2019-05-15 21:06:57 +0800
commit4b9c3bd39a3df06600339ec4b06060cce30b6042 (patch)
treed2ef6bdd42cfc422823a0ee972671b362243d232 /swarm/storage
parent9b0d1b9ab2447f2e7b876cff9905294a1208565b (diff)
downloadgo-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar.gz
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar.bz2
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar.lz
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar.xz
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.tar.zst
go-tangerine-4b9c3bd39a3df06600339ec4b06060cce30b6042.zip
swarm/storage: disable open tracing on indices (#19578)
Diffstat (limited to 'swarm/storage')
-rw-r--r--swarm/storage/localstore/subscription_pull.go15
-rw-r--r--swarm/storage/localstore/subscription_push.go14
2 files changed, 0 insertions, 29 deletions
diff --git a/swarm/storage/localstore/subscription_pull.go b/swarm/storage/localstore/subscription_pull.go
index dd07add53..ce539924b 100644
--- a/swarm/storage/localstore/subscription_pull.go
+++ b/swarm/storage/localstore/subscription_pull.go
@@ -26,9 +26,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/shed"
- "github.com/ethereum/go-ethereum/swarm/spancontext"
- "github.com/opentracing/opentracing-go"
- olog "github.com/opentracing/opentracing-go/log"
"github.com/syndtr/goleveldb/leveldb"
)
@@ -88,9 +85,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
// - context is done
metrics.GetOrRegisterCounter(metricName+".iter", nil).Inc(1)
- ctx, sp := spancontext.StartSpan(ctx, metricName+".iter")
- sp.LogFields(olog.Int("bin", int(bin)), olog.Uint64("since", since), olog.Uint64("until", until))
-
iterStart := time.Now()
var count int
err := db.pullIndex.Iterate(func(item shed.Item) (stop bool, err error) {
@@ -131,15 +125,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
totalTimeMetric(metricName+".iter", iterStart)
- sp.FinishWithOptions(opentracing.FinishOptions{
- LogRecords: []opentracing.LogRecord{
- {
- Timestamp: time.Now(),
- Fields: []olog.Field{olog.Int("count", count)},
- },
- },
- })
-
if err != nil {
if err == errStopSubscription {
// stop subscription without any errors
diff --git a/swarm/storage/localstore/subscription_push.go b/swarm/storage/localstore/subscription_push.go
index f2463af2a..c43a751f4 100644
--- a/swarm/storage/localstore/subscription_push.go
+++ b/swarm/storage/localstore/subscription_push.go
@@ -25,9 +25,6 @@ import (
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/swarm/chunk"
"github.com/ethereum/go-ethereum/swarm/shed"
- "github.com/ethereum/go-ethereum/swarm/spancontext"
- "github.com/opentracing/opentracing-go"
- olog "github.com/opentracing/opentracing-go/log"
)
// SubscribePush returns a channel that provides storage chunks with ordering from push syncing index.
@@ -68,8 +65,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
// - context is done
metrics.GetOrRegisterCounter(metricName+".iter", nil).Inc(1)
- ctx, sp := spancontext.StartSpan(ctx, metricName+".iter")
-
iterStart := time.Now()
var count int
err := db.pushIndex.Iterate(func(item shed.Item) (stop bool, err error) {
@@ -106,15 +101,6 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop fun
totalTimeMetric(metricName+".iter", iterStart)
- sp.FinishWithOptions(opentracing.FinishOptions{
- LogRecords: []opentracing.LogRecord{
- {
- Timestamp: time.Now(),
- Fields: []olog.Field{olog.Int("count", count)},
- },
- },
- })
-
if err != nil {
metrics.GetOrRegisterCounter(metricName+".iter.error", nil).Inc(1)
log.Error("localstore push subscription iteration", "err", err)