Skip to content

Commit

Permalink
Make sdk's Span#SetSpan thread-safe (#232)
Browse files Browse the repository at this point in the history
[Closes #230]
  • Loading branch information
iredelmeier authored and rghetia committed Oct 22, 2019
1 parent b04db14 commit e4052cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/trace/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (s *span) addEventWithTimestamp(timestamp time.Time, msg string, attrs ...c
}

func (s *span) SetName(name string) {
s.mu.Lock()
defer s.mu.Unlock()

if s.data == nil {
// TODO: now what?
return
Expand Down

0 comments on commit e4052cf

Please sign in to comment.