File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
sentry_sdk/integrations/celery Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -329,9 +329,7 @@ def _inner(*args: "Any", **kwargs: "Any") -> "Any":
329329 headers = args [3 ].get ("headers" ) or {}
330330 if span_streaming :
331331 sentry_sdk .traces .continue_trace (headers )
332- transaction = sentry_sdk .traces .start_span (
333- name = "unknown celery task"
334- )
332+ transaction = sentry_sdk .traces .start_span (name = task .name )
335333 transaction .set_origin (CeleryIntegration .origin )
336334 transaction .set_source (TransactionSource .TASK )
337335 transaction .set_op (OP .QUEUE_TASK_CELERY )
@@ -342,11 +340,10 @@ def _inner(*args: "Any", **kwargs: "Any") -> "Any":
342340 transaction = continue_trace (
343341 headers ,
344342 op = OP .QUEUE_TASK_CELERY ,
345- name = "unknown celery task" ,
343+ name = task . name ,
346344 source = TransactionSource .TASK ,
347345 origin = CeleryIntegration .origin ,
348346 )
349- transaction .name = task .name
350347 transaction .set_status (SPANSTATUS .OK )
351348
352349 span_ctx = sentry_sdk .start_transaction (
You can’t perform that action at this time.
0 commit comments