Skip to content

Commit 2c4dab5

Browse files
committed
remove the set once stuff I guess
1 parent 1ffa3b9 commit 2c4dab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentry_sdk/opentelemetry/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def setup_sentry_tracing():
3131
# type: () -> None
3232
# TracerProvider can only be set once. If we're the first ones setting it,
3333
# there's no issue. If it already exists, we need to patch it.
34-
from opentelemetry.trace import _TRACER_PROVIDER_SET_ONCE
34+
from opentelemetry.trace import _TRACER_PROVIDER
3535

36-
if _TRACER_PROVIDER_SET_ONCE._done:
36+
if _TRACER_PROVIDER is not None:
3737
logger.debug("[Tracing] Detected an existing TracerProvider, patching")
3838
tracer_provider = trace.get_tracer_provider()
3939
tracer_provider.sampler = SentrySampler()

0 commit comments

Comments
 (0)