Skip to content
This repository was archived by the owner on Aug 17, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions agent/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"time"

"github.com/google/uuid"
"github.com/opentracing/opentracing-go"
"gopkg.in/tomb.v2"

"go.undefinedlabs.com/scopeagent/tags"
Expand Down Expand Up @@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which cases it gave a wrong test span count?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here: https://github.com/undefinedlabs/scope-go-agent/blob/fix-test-counter/agent/recorder.go#L181-L189

The problem with that counter, is that is being used here: https://github.com/undefinedlabs/scope-go-agent/blob/fix-test-counter/agent/report.go#L12

So if the that value is always zero, always return "success" while we have some KO in the backend...

if isTestSpan(tags) {
testSpans++
}
}
}

Expand Down