Skip to content

Commit

Permalink
fix: Race condition on span with defer in errgrp
Browse files Browse the repository at this point in the history
  • Loading branch information
Matovidlo committed Nov 20, 2024
1 parent 0412bce commit 665e97a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ func (n *Node) cleanMetadata(ctx context.Context) (err error) {

// Trace each job
ctx, span := n.telemetry.Tracer().Start(ctx, "keboola.go.stream.model.cleanup.metadata.cleanJob")
defer span.End(&err)

err, deleted := n.bridge.CleanJob(ctx, job)
if deleted {
jobCounter.Add(1)
}

span.End(&err)
return err
})

Expand Down

0 comments on commit 665e97a

Please sign in to comment.