Skip to content

Commit b71f948

Browse files
remove LegacySpan alias
1 parent cea78bc commit b71f948

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

sentry_sdk/tracing_utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def add_source(
325325
except Exception:
326326
lineno = None
327327
if lineno is not None:
328-
if isinstance(span, LegacySpan):
328+
if isinstance(span, Span):
329329
span.set_data(SPANDATA.CODE_LINENO, lineno)
330330
else:
331331
span.set_attribute("code.line.number", lineno)
@@ -335,7 +335,7 @@ def add_source(
335335
except Exception:
336336
namespace = None
337337
if namespace is not None:
338-
if isinstance(span, LegacySpan):
338+
if isinstance(span, Span):
339339
span.set_data(SPANDATA.CODE_NAMESPACE, namespace)
340340
else:
341341
span.set_attribute(SPANDATA.CODE_NAMESPACE, namespace)
@@ -349,7 +349,7 @@ def add_source(
349349
else:
350350
in_app_path = filepath
351351

352-
if isinstance(span, LegacySpan):
352+
if isinstance(span, Span):
353353
span.set_data(SPANDATA.CODE_FILEPATH, in_app_path)
354354
else:
355355
if in_app_path is not None:
@@ -361,7 +361,7 @@ def add_source(
361361
code_function = None
362362

363363
if code_function is not None:
364-
if isinstance(span, LegacySpan):
364+
if isinstance(span, Span):
365365
span.set_data(SPANDATA.CODE_FUNCTION, frame.f_code.co_name)
366366
else:
367367
span.set_attribute(SPANDATA.CODE_FUNCTION, frame.f_code.co_name)
@@ -377,9 +377,9 @@ def add_query_source(
377377
if not client.is_active():
378378
return
379379

380-
if isinstance(span, LegacySpan):
380+
if isinstance(span, Span):
381381
# In the StreamedSpan case, we need to add the extra span information before
382-
# the span finishes, so it's expected that this will be None. In the LegacySpan case,
382+
# the span finishes, so it's expected that this will be None. In the Span case,
383383
# it should already be finished.
384384
if span.timestamp is None:
385385
return
@@ -423,9 +423,9 @@ def add_http_request_source(
423423
if not client.is_active():
424424
return
425425

426-
if isinstance(span, LegacySpan):
426+
if isinstance(span, Span):
427427
# In the StreamedSpan case, we need to add the extra span information before
428-
# the span finishes, so it's expected that this will be None. In the LegacySpan case,
428+
# the span finishes, so it's expected that this will be None. In the Span case,
429429
# it should already be finished.
430430
if span.timestamp is None:
431431
return
@@ -1723,7 +1723,7 @@ def _matches(rule: "Any", value: "Any") -> bool:
17231723
SENTRY_TRACE_HEADER_NAME,
17241724
)
17251725
from sentry_sdk.tracing import (
1726-
Span as LegacySpan,
1726+
Span
17271727
)
17281728

17291729
if TYPE_CHECKING:

0 commit comments

Comments
 (0)