Tracing of Celery tasks does not work with Signatures #1416
Labels
Enhancement
New feature or request
Help wanted
Extra attention is needed
Integration: Celery
Triaged
Has been looked at recently during old issue triage
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.5.10
Steps to Reproduce
The python sentry_sdk celery integration uses
_wrap_apply_async
to wrap thecelery.Task.apply_async
method. However it does not wrap celery Signatures as these have their ownapply_async
method defined in the celery package incelery/canvas.py
. This means that tasks defined using signatures are not traced.To reproduce:
This does not produce traces. Alternatively,
Running the following fixes the issue:
Expected Result
Transactions visible in the UI.
Actual Result
No transaction visible. Stepping through the code with a debugger, the function created with _wrap_apply_async is not called as the
Signature.apply_async
method is not wrapped.The text was updated successfully, but these errors were encountered: