Skip to content

Commit

Permalink
ref(celery): Handle retry count exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
szokeasaurusrex committed May 7, 2024
1 parent 73c11e8 commit 42f3b19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sentry_sdk/integrations/celery/__init__.py
Expand Up @@ -337,7 +337,8 @@ def _inner(*args, **kwargs):
op=OP.QUEUE_PROCESS, description=task.name
) as span:
_set_messaging_destination_name(task, span)
span.set_data("messaging.message.retry.count", task.request.retries)
with capture_internal_exceptions():
span.set_data("messaging.message.retry.count", task.request.retries)
return f(*args, **kwargs)
except Exception:
exc_info = sys.exc_info()
Expand Down

0 comments on commit 42f3b19

Please sign in to comment.