openzipkin / brave

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

MutableSpan.clone isn't implemented #1429

Open codefromthecrypt opened 7 months ago

codefromthecrypt commented 7 months ago

MutableSpan.clone isn't implemented. It was originally here for folks to transfer a mutable span to another thread when they weren't the end of the line of SpanHandlers.

As no one noticed, it probably doesn't matter, but raising just in case someone cars.

workaround:

You can return false on SpanHandler.end after transferring your span to another thread meanwhile. Returning false will prevent a later handler from working on the same object, and has no harm in typical case where there is only one handler (span reporter) or that is at the end anyway.

codefromthecrypt commented 7 months ago

I think this is also not relevant when all handlers read, but don't mutate, the span.