You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exemplar.random() is used concurrently resulting in a data race (below). Access to a rand.Rand is not safe for concurrent use per the documentation:
Random numbers are generated by a Source, usually wrapped in a Rand. Both types should be used by a single goroutine at a time: sharing among multiple goroutines requires some kind of synchronization.
Fix#5455
The `math/rand.Rand` type is not safe for concurrent access. Concurrent
measurements, and therefore concurrent exemplar computation, are
allowed. Ensure this concurrent design does not lead to data races with
`rng`.
Description
exemplar.random()
is used concurrently resulting in a data race (below). Access to arand.Rand
is not safe for concurrent use per the documentation:The resulting race:
Environment
Steps To Reproduce
OTEL_GO_X_EXEMPLAR
-race
flag enabled.Expected behavior
No data race; likely via adding a mutex to
exemplar.random
similar to themath/rand
package-level functions.The text was updated successfully, but these errors were encountered: