Skip to content

Commit 4b9c3bd

Browse files
authored
swarm/storage: disable open tracing on indices (#19578)
1 parent 9b0d1b9 commit 4b9c3bd

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

‎swarm/storage/localstore/subscription_pull.go‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ import (
2626
"github.com/ethereum/go-ethereum/metrics"
2727
"github.com/ethereum/go-ethereum/swarm/chunk"
2828
"github.com/ethereum/go-ethereum/swarm/shed"
29-
"github.com/ethereum/go-ethereum/swarm/spancontext"
30-
"github.com/opentracing/opentracing-go"
31-
olog "github.com/opentracing/opentracing-go/log"
3229
"github.com/syndtr/goleveldb/leveldb"
3330
)
3431

@@ -88,9 +85,6 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
8885
// - context is done
8986
metrics.GetOrRegisterCounter(metricName+".iter", nil).Inc(1)
9087

91-
ctx, sp := spancontext.StartSpan(ctx, metricName+".iter")
92-
sp.LogFields(olog.Int("bin", int(bin)), olog.Uint64("since", since), olog.Uint64("until", until))
93-
9488
iterStart := time.Now()
9589
var count int
9690
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)
131125

132126
totalTimeMetric(metricName+".iter", iterStart)
133127

134-
sp.FinishWithOptions(opentracing.FinishOptions{
135-
LogRecords: []opentracing.LogRecord{
136-
{
137-
Timestamp: time.Now(),
138-
Fields: []olog.Field{olog.Int("count", count)},
139-
},
140-
},
141-
})
142-
143128
if err != nil {
144129
if err == errStopSubscription {
145130
// stop subscription without any errors

‎swarm/storage/localstore/subscription_push.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ import (
2525
"github.com/ethereum/go-ethereum/metrics"
2626
"github.com/ethereum/go-ethereum/swarm/chunk"
2727
"github.com/ethereum/go-ethereum/swarm/shed"
28-
"github.com/ethereum/go-ethereum/swarm/spancontext"
29-
"github.com/opentracing/opentracing-go"
30-
olog "github.com/opentracing/opentracing-go/log"
3128
)
3229

3330
// 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
6865
// - context is done
6966
metrics.GetOrRegisterCounter(metricName+".iter", nil).Inc(1)
7067

71-
ctx, sp := spancontext.StartSpan(ctx, metricName+".iter")
72-
7368
iterStart := time.Now()
7469
var count int
7570
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
106101

107102
totalTimeMetric(metricName+".iter", iterStart)
108103

109-
sp.FinishWithOptions(opentracing.FinishOptions{
110-
LogRecords: []opentracing.LogRecord{
111-
{
112-
Timestamp: time.Now(),
113-
Fields: []olog.Field{olog.Int("count", count)},
114-
},
115-
},
116-
})
117-
118104
if err != nil {
119105
metrics.GetOrRegisterCounter(metricName+".iter.error", nil).Inc(1)
120106
log.Error("localstore push subscription iteration", "err", err)

0 commit comments

Comments
 (0)