Skip to content

Commit 0d337be

Browse files
committed
move
1 parent cc517fe commit 0d337be

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sentry_sdk/_init_implementation.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
import sentry_sdk
44
from sentry_sdk.consts import ClientConstructor
55
from sentry_sdk.opentelemetry.scope import setup_scope_context_management
6-
from sentry_sdk.opentelemetry.integration import (
7-
patch_readable_span,
8-
setup_sentry_tracing,
9-
)
106

117
if TYPE_CHECKING:
128
from typing import Any, Optional
@@ -26,8 +22,6 @@ def _init(*args, **kwargs):
2622
2723
This takes the same arguments as the client constructor.
2824
"""
29-
patch_readable_span()
30-
setup_sentry_tracing()
3125
setup_scope_context_management()
3226
client = sentry_sdk.Client(*args, **kwargs)
3327
sentry_sdk.get_global_scope().set_client(client)

sentry_sdk/client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import TYPE_CHECKING, List, Dict, cast, overload
99

1010
from sentry_sdk._compat import check_uwsgi_thread_support
11+
1112
from sentry_sdk.utils import (
1213
AnnotatedValue,
1314
ContextVar,
@@ -35,6 +36,10 @@
3536
from sentry_sdk.integrations.dedupe import DedupeIntegration
3637
from sentry_sdk.sessions import SessionFlusher
3738
from sentry_sdk.envelope import Envelope
39+
from sentry_sdk.opentelemetry.integration import (
40+
patch_readable_span,
41+
setup_sentry_tracing,
42+
)
3843
from sentry_sdk.profiler.continuous_profiler import setup_continuous_profiler
3944
from sentry_sdk.profiler.transaction_profiler import (
4045
has_profiling_enabled,
@@ -392,6 +397,8 @@ def _capture_envelope(envelope):
392397
except Exception as e:
393398
logger.debug("Can not set up continuous profiler. (%s)", e)
394399

400+
patch_readable_span()
401+
setup_sentry_tracing()
395402
finally:
396403
_client_init_debug.set(old_debug)
397404

0 commit comments

Comments
 (0)