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
An unlikely race condition exists where multiple threads can set the global tracer provider at once, bypassing the check that the global tracer provider is only set once (code). This code needs a lock to prevent this condition:
logger.warning("Overriding of current TracerProvider is not allowed")
return
_TRACER_PROVIDER=tracer_provider
Describe your environment N/A
Steps to reproduce
Difficult to reproduce (race condition)
What is the expected behavior?
You can only configure the global tracer provider exactly once. All existing ProxyTracer instances should now proxy through this single global.
What is the actual behavior?
Global tracer provider could be set more than once if multiple threads attempt to do so. That could lead some ProxyTracer instances to cache a _real_tracer from a stale tracer provider and that Telemetry is lost or misconfigured.
Additional context
Ran into this while working on proxying for metrics.
The text was updated successfully, but these errors were encountered:
An unlikely race condition exists where multiple threads can set the global tracer provider at once, bypassing the check that the global tracer provider is only set once (code). This code needs a lock to prevent this condition:
opentelemetry-python/opentelemetry-api/src/opentelemetry/trace/__init__.py
Lines 487 to 491 in c9b18c6
Describe your environment N/A
Steps to reproduce
Difficult to reproduce (race condition)
What is the expected behavior?
You can only configure the global tracer provider exactly once. All existing ProxyTracer instances should now proxy through this single global.
What is the actual behavior?
Global tracer provider could be set more than once if multiple threads attempt to do so. That could lead some
ProxyTracer
instances to cache a_real_tracer
from a stale tracer provider and that Telemetry is lost or misconfigured.Additional context
Ran into this while working on proxying for metrics.
The text was updated successfully, but these errors were encountered: