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
We have a bunch of public fields on Span that cannot be safely accessed in multi-threaded code. These fields include Error, Name, Meta, and Metrics. We can't even ask the user to lock the span themselves before accessing these fields, as the mutex that protects them is private.
This is particular concerning for Meta and Metrics, as concurrent hash accesses can cause panics in newer versions of Go.
We should make these fields private and write public, thread-safe getters and setters to access this data.
The text was updated successfully, but these errors were encountered:
@elijahandrews I'm going to change our public API since our Tracer should not expose some fields now that we're moving to OpenTracing. This issue should be addressed as a consequence.
@elijahandrews the new OpenTracing API (#126) returns a Span interface that sets the underlying fields using the span.SetTag(k,v) method. In that case, a mutex will be used both for updating the Meta and other fields (Service, Resource, Type).
Since we're moving towards a OpenTracing-only API, we can consider this issue closed. Of course some pieces may be missing, but I think we should open other issues for those. Thank you!
We have a bunch of public fields on
Span
that cannot be safely accessed in multi-threaded code. These fields includeError
,Name
,Meta
, andMetrics
. We can't even ask the user to lock the span themselves before accessing these fields, as the mutex that protects them is private.This is particular concerning for
Meta
andMetrics
, as concurrent hash accesses can cause panics in newer versions of Go.We should make these fields private and write public, thread-safe getters and setters to access this data.
The text was updated successfully, but these errors were encountered: