dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

ddtrace/tracer: TestAutoDetectStatsd fails, receives traceproftest metric

Open nsrip-dd opened this issue 3 years ago • 2 comments

See: https://app.circleci.com/pipelines/github/DataDog/dd-trace-go/3620/workflows/aa0499a0-d8ab-4454-8027-d849db97a89f/jobs/26473

The failure looks like this:

Failed
=== RUN   TestAutoDetectStatsd/agent/default
    option_test.go:69: 
        	Error Trace:	option_test.go:69
        	            				option_test.go:129
        	Error:      	"datadog.tracer.traces_dropped:2|c|#lang:go,version:v1.39.0,lang_version:go1.16.12,service:traceproftest.test,runtime-id:55f8f976-2765-4a7c-a2a9-4bf3ffc108ee,reason:send_failed\n" does not contain "name:1|c|#lang:go"
        	Test:       	TestAutoDetectStatsd/agent/default
        --- FAIL: TestAutoDetectStatsd/agent/default (0.00s)

Note that the metric is datadog.trace.traces_dropped and there's a service:traceproftest.test tag. Is traceproftest leaking something, or being tested concurrently with ddtrace/tracer? That's the package tested before ddtrace/trace in this run:

✓  internal/traceprof/traceproftest (4.143s) (coverage: 80.7% of statements)
✖  ddtrace/tracer (16.403s) (coverage: 76.3% of statements)

That datadog.trace.traces_dropped metric is emitted here.

nsrip-dd avatar May 12 '22 14:05 nsrip-dd

Is this a flaky test? cc @knusbaum from rotation

felixge avatar May 13 '22 11:05 felixge

I'm not sure if I'd call it flaky? This failure message suggests that the test was influenced by tests from a completely different package. Maybe there's some way we can make the test more isolated from the effects of other stuff that happens to be running at the same time on the build host?

nsrip-dd avatar May 13 '22 12:05 nsrip-dd