openzipkin / brave

Java distributed tracing implementation compatible with Zipkin backend services.
Apache License 2.0
2.36k stars 713 forks source link

Fixes thread safety issue in Tag.tag #1434

Closed codefromthecrypt closed 7 months ago

codefromthecrypt commented 7 months ago

The current codebase carefully synchronizes all access to MutableSpan where there can be concurrent use. We missed a spot where Tag.tag is not synchronizing access. The only other place we don't guard is ScopedSpan, which is documented explicitly as not thread safe.

Fixes #1384