Skip to content

Commit 9a63d8c

Browse files
committed
cleanup
1 parent c2d4e48 commit 9a63d8c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -859,14 +859,10 @@ async def async_wrapper(*args, **kwargs):
859859
)
860860
return await f(*args, **kwargs)
861861

862-
start_span_func = (
863-
current_span.start_child if current_span else sentry_sdk.start_span
864-
)
865-
866862
span_op = op or OP.FUNCTION
867863
span_name = name or qualname_from_function(f) or ""
868864

869-
with start_span_func(
865+
with current_span.start_child(
870866
op=span_op,
871867
name=span_name,
872868
) as span:
@@ -892,14 +888,10 @@ def sync_wrapper(*args, **kwargs):
892888
)
893889
return f(*args, **kwargs)
894890

895-
start_span_func = (
896-
current_span.start_child if current_span else sentry_sdk.start_span
897-
)
898-
899891
span_op = op or OP.FUNCTION
900892
span_name = name or qualname_from_function(f) or ""
901893

902-
with start_span_func(
894+
with current_span.start_child(
903895
op=span_op,
904896
name=span_name,
905897
) as span:

0 commit comments

Comments
 (0)