diff --git a/agent/recorder.go b/agent/recorder.go index 5d994aad..2c528f05 100644 --- a/agent/recorder.go +++ b/agent/recorder.go @@ -14,6 +14,7 @@ import ( "time" "github.com/google/uuid" + "github.com/opentracing/opentracing-go" "gopkg.in/tomb.v2" "go.undefinedlabs.com/scopeagent/tags" @@ -168,8 +169,10 @@ func (r *SpanRecorder) sendSpans() (error, bool) { var testSpans int64 for _, span := range spans { - if isTestSpan(span) { - testSpans++ + if tags, ok := span["tags"].(opentracing.Tags); ok { + if isTestSpan(tags) { + testSpans++ + } } }