getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 658 forks source link

Clarify integration with Celery when using Django #903

Open JeanFred opened 7 years ago

JeanFred commented 7 years ago

Hello,

I am a bit confused by the documentation on how to use Raven with Celery in the context of Django.

The documentation states that « If you are also using Celery, there is a handler being automatically registered for you that captures the errors from workers. ». Which is quite cool!

However I have noticed that Celery-based errors come to Sentry with very little information − no stack-trace, no breadcrumbs.

Conversely, I have another Django app where (mainly for historical reasons) we registered Raven both in the Django configuration and using the Celery integration instructions − and the error reporting in Sentry is better. (But it might be for other reasons / configurations)

My question would be : is the handler automatically set via Django expected to be a fully-fledged integration, or is it a basic integration, and it is needed to also use the register_signal snippets to?

The docs could also use a short sentence making that clearer :)

Thanks !

JeanFred commented 7 years ago

Gently upping this :) Would anyone have any idea?

mattrobenolt commented 7 years ago

Hard to say since configurations vary a lot. So the best I can probably do is point you to how we use it ourselves in Sentry: https://github.com/getsentry/sentry/blob/master/src/sentry/celery.py#L63-L74