Skip to content

Commit 7a8ced2

Browse files
committed
.
1 parent 45c4efc commit 7a8ced2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sentry_sdk/integrations/celery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def _inner(*args: "Any", **kwargs: "Any") -> "Any":
333333
with capture_internal_exceptions():
334334
custom_sampling_context = {
335335
"celery_job": {
336-
"task": task.name,
336+
"task": getattr(task, "name", None),
337337
# for some reason, args[1] is a list if non-empty but a
338338
# tuple if empty
339339
"args": list(args[1]),

0 commit comments

Comments
 (0)