Skip to content

Commit c752264

Browse files
.
1 parent 49fafc3 commit c752264

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

sentry_sdk/integrations/ray.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,11 @@ def new_func(
9696
if span_streaming:
9797
sentry_sdk.traces.continue_trace(_sentry_tracing or {})
9898

99+
function_name = qualname_from_function(user_f)
99100
with sentry_sdk.traces.start_span(
100-
name=qualname_from_function(user_f),
101+
name="unknown Ray task"
102+
if function_name is None
103+
else function_name,
101104
attributes={
102105
"sentry.op": OP.QUEUE_TASK_RAY,
103106
"sentry.origin": RayIntegration.origin,
@@ -152,8 +155,11 @@ def _remote_method_with_header_propagation(
152155
sentry_sdk.get_client().options
153156
)
154157
if span_streaming:
158+
function_name = qualname_from_function(user_f)
155159
with sentry_sdk.traces.start_span(
156-
name=qualname_from_function(user_f),
160+
name="unknown Ray task"
161+
if function_name is None
162+
else function_name,
157163
attributes={
158164
"sentry.op": OP.QUEUE_SUBMIT_RAY,
159165
"sentry.origin": RayIntegration.origin,

0 commit comments

Comments
 (0)