Skip to content

Commit

Permalink
fix: add missing span.End() (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
birdychang authored May 11, 2023
1 parent 16d4ddf commit 0c54ee4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions tasks/blocks/drand/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (p *Task) ProcessTipSet(ctx context.Context, ts *types.TipSet) (model.Persi
attribute.String("processor", "blocks"),
)
}
defer span.End()

var pl model.PersistableList
for _, bh := range ts.Blocks() {
Expand Down
1 change: 1 addition & 0 deletions tasks/blocks/headers/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (p *Task) ProcessTipSet(ctx context.Context, ts *types.TipSet) (model.Persi
attribute.String("processor", "blocks"),
)
}
defer span.End()

var pl model.PersistableList
for _, bh := range ts.Blocks() {
Expand Down
1 change: 1 addition & 0 deletions tasks/blocks/parents/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (p *Task) ProcessTipSet(ctx context.Context, ts *types.TipSet) (model.Persi
attribute.String("processor", "blocks"),
)
}
defer span.End()

var pl model.PersistableList
for _, bh := range ts.Blocks() {
Expand Down
2 changes: 2 additions & 0 deletions tasks/fevmactorstats/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func (p *Task) ProcessTipSet(ctx context.Context, ts *types.TipSet) (model.Persi
attribute.String("processor", "fevmactorstats"),
)
}
defer span.End()

report := &visormodel.ProcessingReport{
Height: int64(ts.Height()),
StateRoot: ts.ParentState().String(),
Expand Down
2 changes: 1 addition & 1 deletion tasks/messages/blockmessage/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewTask(node tasks.DataSource) *Task {
}

func (t *Task) ProcessTipSet(ctx context.Context, current *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) {
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets")
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSet")
if span.IsRecording() {
span.SetAttributes(
attribute.String("current", current.String()),
Expand Down
2 changes: 1 addition & 1 deletion tasks/messages/gaseconomy/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func NewTask(node tasks.DataSource) *Task {
}

func (t *Task) ProcessTipSet(ctx context.Context, current *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) {
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets")
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSet")
if span.IsRecording() {
span.SetAttributes(
attribute.String("current", current.String()),
Expand Down
2 changes: 1 addition & 1 deletion tasks/messages/message/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewTask(node tasks.DataSource) *Task {
}

func (t *Task) ProcessTipSet(ctx context.Context, current *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) {
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets")
ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSet")
if span.IsRecording() {
span.SetAttributes(
attribute.String("current", current.String()),
Expand Down

0 comments on commit 0c54ee4

Please sign in to comment.