Skip to content

Commit

Permalink
ddtrace/opentelemetry: add lock to opentelemetry.Span.End function
Browse files Browse the repository at this point in the history
  • Loading branch information
darccio committed Jan 19, 2024
1 parent 4db858f commit a3c3459
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ddtrace/opentelemetry/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func (s *span) End(options ...oteltrace.SpanEndOption) {
if s.finished {
return
}
s.mu.Lock()
defer s.mu.Unlock()
s.finished = true
for k, v := range s.attributes {
// if we find operation.name,
Expand Down

0 comments on commit a3c3459

Please sign in to comment.