We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19307cc commit aa37a99Copy full SHA for aa37a99
delayed_spans.go
@@ -42,7 +42,12 @@ func (ds *delayedSpans) flush() {
42
continue
43
}
44
45
- if sensor.Agent().Ready() {
+ // Get agent ready status under proper synchronization
46
+ muSensor.Lock()
47
+ agentReady := sensor != nil && sensor.Agent().Ready()
48
+ muSensor.Unlock()
49
+
50
+ if agentReady {
51
s.tracer.recorder.RecordSpan(s)
52
} else {
53
ds.append(s)
delayed_spans_test.go
@@ -56,7 +56,7 @@ func TestPartiallyFlushDelayedSpans(t *testing.T) {
56
57
notReadyAfter := maxDelayedSpans / 10
58
sensor.agent = &eventuallyNotReadyClient{
59
- notReadyAfter: uint64(notReadyAfter),
+ notReadyAfter: uint64(notReadyAfter * 2),
60
61
62
delayed.flush()
0 commit comments