File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
sentry_sdk/integrations/opentelemetry Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
- # TODO-neel-potel fix circular imports
2
- # from sentry_sdk.integrations.opentelemetry.span_processor import ( # noqa: F401
3
- # SentrySpanProcessor,
4
- # )
1
+ from sentry_sdk .integrations .opentelemetry .span_processor import ( # noqa: F401
2
+ SentrySpanProcessor ,
3
+ )
5
4
6
- # from sentry_sdk.integrations.opentelemetry.propagator import ( # noqa: F401
7
- # SentryPropagator,
8
- # )
5
+ from sentry_sdk .integrations .opentelemetry .propagator import ( # noqa: F401
6
+ SentryPropagator ,
7
+ )
Original file line number Diff line number Diff line change 13
13
INVALID_SPAN_ID ,
14
14
INVALID_TRACE_ID ,
15
15
)
16
- from sentry_sdk import get_client , start_transaction
17
16
from sentry_sdk .integrations .opentelemetry .consts import (
18
17
SENTRY_BAGGAGE_KEY ,
19
18
SENTRY_TRACE_KEY ,
@@ -106,6 +105,8 @@ def _prune_old_spans(self):
106
105
107
106
def on_start (self , otel_span , parent_context = None ):
108
107
# type: (OTelSpan, Optional[context_api.Context]) -> None
108
+ from sentry_sdk import get_client , start_transaction
109
+
109
110
client = get_client ()
110
111
111
112
if not client .dsn :
Original file line number Diff line number Diff line change 8
8
from sentry_sdk .tracing import get_span_status_from_http_code
9
9
from urllib3 .util import parse_url as urlparse
10
10
11
- from sentry_sdk import get_client
12
11
from sentry_sdk .utils import Dsn
13
12
14
13
from sentry_sdk ._types import TYPE_CHECKING
@@ -43,6 +42,8 @@ def is_sentry_span(span):
43
42
Break infinite loop:
44
43
HTTP requests to Sentry are caught by OTel and send again to Sentry.
45
44
"""
45
+ from sentry_sdk import get_client
46
+
46
47
if not span .attributes :
47
48
return False
48
49
You can’t perform that action at this time.
0 commit comments