Skip to content

Commit 47731a6

Browse files
committed
always set span name in celery
1 parent 9f08d62 commit 47731a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/celery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def sentry_publish(self: "Producer", *args: "Any", **kwargs: "Any") -> "Any":
540540
# method will still work.
541541
kwargs_headers = {}
542542

543-
task_name = kwargs_headers.get("task")
543+
task_name = kwargs_headers.get("task") or "unknown celery task"
544544
task_id = kwargs_headers.get("id")
545545
retries = kwargs_headers.get("retries")
546546

0 commit comments

Comments
 (0)