diff --git a/README.md b/README.md index bd3f4e8..c4e941b 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ $ go test -v ./example | go-test-trace -stdin You can export to any collector by using the endpoint flag: ``` -$ go-test-trace ./example -endpoint=my-otel-collector.io:9090 +$ go-test-trace -endpoint=my-otel-collector.io:9090 ./example ``` You can make the go-test-trace to participate into an existing trace with the traceparent flag. ``` -$ go-test-trace ./example -traceparent=00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01 +$ go-test-trace -traceparent=00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01 ./example ``` ## Running the collector diff --git a/main.go b/main.go index ee78f0a..485cacf 100644 --- a/main.go +++ b/main.go @@ -139,6 +139,9 @@ func trace(args []string) error { startTime: data.Time, } case "pass", "fail", "skip": + if data.Test == "" { + continue + } spanData, ok := collectedSpans[data.Test] if !ok { return // should never happen