We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d331795 commit 654a593Copy full SHA for 654a593
1 file changed
plugins/core/context.go
@@ -57,11 +57,12 @@ func (t *TracingContext) TakeSnapShot() interface{} {
57
58
func (t *TracingContext) ActiveSpan() TracingSpan {
59
t.activeSpanLock.RLock()
60
- defer t.activeSpanLock.RUnlock()
61
- if t.activeSpan == nil || reflect.ValueOf(t.activeSpan).IsZero() {
+ data := t.activeSpan
+ t.activeSpanLock.RUnlock()
62
+ if data == nil || reflect.ValueOf(data).IsZero() {
63
return nil
64
}
- return t.activeSpan
65
+ return data
66
67
68
func (t *TracingContext) SaveActiveSpan(s TracingSpan) {
0 commit comments