[otelhttp] Data race warning causing test failures in Bitbucket pipelines #5140
Labels
area: instrumentation
Related to an instrumentation package
bug
Something isn't working
instrumentation: otelhttp
Description
During test execution in Bitbucket pipelines, a data race warning occurs when using otelhttp.NewTransport as the transport mechanism in the HTTP client and calling the Do() method from the standard Go "net/http" library. This warning leads to test failures in Bitbucket pipelines.This warning does not always appear, about 7 out of 10 times during test runs.
Environment
otelhttp
version: [v0.48.0]Steps To Reproduce
1.Run the tests where otelhttp.NewTransport is used as the transport mechanism in the HTTP client.
2.Observe the data race warning that may occur when calling the Do() method of the HTTP client from the standard Go "net/http" library.
resp, err := httpClient.Do(req)
Note that this warning does not occur consistently but rather approximately 7 out of 10 times during test runs.
Expected behavior
The golang race detector shouldn't give a race report when using otelhttp.
The text was updated successfully, but these errors were encountered: