Skip to content

Commit c2d4e48

Browse files
committed
removed too much
1 parent 10e82cd commit c2d4e48

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -863,12 +863,14 @@ async def async_wrapper(*args, **kwargs):
863863
current_span.start_child if current_span else sentry_sdk.start_span
864864
)
865865

866-
function_name = name or qualname_from_function(f) or ""
866+
span_op = op or OP.FUNCTION
867+
span_name = name or qualname_from_function(f) or ""
867868

868869
with start_span_func(
869-
op=OP.FUNCTION,
870-
name=function_name,
871-
):
870+
op=span_op,
871+
name=span_name,
872+
) as span:
873+
span.update_data(attributes or {})
872874
result = await f(*args, **kwargs)
873875
return result
874876

@@ -894,12 +896,14 @@ def sync_wrapper(*args, **kwargs):
894896
current_span.start_child if current_span else sentry_sdk.start_span
895897
)
896898

897-
function_name = name or qualname_from_function(f) or ""
899+
span_op = op or OP.FUNCTION
900+
span_name = name or qualname_from_function(f) or ""
898901

899902
with start_span_func(
900-
op=OP.FUNCTION,
901-
name=function_name,
902-
):
903+
op=span_op,
904+
name=span_name,
905+
) as span:
906+
span.update_data(attributes or {})
903907
result = f(*args, **kwargs)
904908
return result
905909

0 commit comments

Comments
 (0)