Make sdk's Span#SetSpan thread-safe (#232)

[Closes #230]
This commit is contained in:
Isobel Redelmeier 2019-10-22 15:25:33 -07:00 committed by rghetia
parent b04db14146
commit e4052cf674
1 changed files with 3 additions and 0 deletions

View File

@ -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