Skip to content

Commit de93551

Browse files
authored
Ensure span ends (OffchainLabs#7405)
* Ensure span ends * Merge refs/heads/master into span-ends * Merge refs/heads/master into span-ends * Add missed span end * Merge branch 'span-ends' of github.com:prysmaticlabs/prysm into span-ends * Merge refs/heads/master into span-ends
1 parent 0839f10 commit de93551

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

validator/client/runner.go

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ func run(ctx context.Context, v Validator) {
8787
select {
8888
case <-ctx.Done():
8989
log.Info("Context canceled, stopping validator")
90+
span.End()
9091
return // Exit if context is canceled.
9192
case slot := <-v.NextSlot():
9293
span.AddAttributes(trace.Int64Attribute("slot", int64(slot)))
@@ -111,6 +112,7 @@ func run(ctx context.Context, v Validator) {
111112
if featureconfig.Get().LocalProtection {
112113
if err := v.UpdateProtections(ctx, slot); err != nil {
113114
log.WithError(err).Error("Could not update validator protection")
115+
span.End()
114116
continue
115117
}
116118
}
@@ -125,6 +127,7 @@ func run(ctx context.Context, v Validator) {
125127
allRoles, err := v.RolesAt(ctx, slot)
126128
if err != nil {
127129
log.WithError(err).Error("Could not get validator roles")
130+
span.End()
128131
continue
129132
}
130133
for pubKey, roles := range allRoles {

0 commit comments

Comments
 (0)