Skip to content
This repository was archived by the owner on Aug 17, 2020. It is now read-only.

Commit 8948a2a

Browse files
committed
fix span counters
1 parent bab1bee commit 8948a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/recorder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ func (r *SpanRecorder) sendSpans() (error, bool) {
220220
statusCode, err := r.callIngest(buf)
221221
if err != nil {
222222
atomic.AddInt64(&r.stats.sendSpansKo, 1)
223-
atomic.AddInt64(&r.stats.spansNotSent, int64(len(spans)))
223+
atomic.AddInt64(&r.stats.spansNotSent, int64(len(sp)))
224224
atomic.AddInt64(&r.stats.testSpansNotSent, testSpans)
225225
setLastError(err)
226226
} else {
227227
atomic.AddInt64(&r.stats.sendSpansOk, 1)
228-
atomic.AddInt64(&r.stats.spansSent, int64(len(spans)))
228+
atomic.AddInt64(&r.stats.spansSent, int64(len(sp)))
229229
atomic.AddInt64(&r.stats.testSpansSent, testSpans)
230230
}
231231
if statusCode == 401 {

0 commit comments

Comments
 (0)