Celery tasks not sending stack traces

310 views
Skip to first unread message

Benjamin Gerdemann

unread,
Apr 17, 2013, 4:07:29 AM4/17/13
to gets...@googlegroups.com
My celery workers are not sending stack traces when they raise exceptions. I only see the file name, line number and exception message. Is this the expected behavior? Exceptions from my Django application include stack traces. 

I am running Django 1.4.3 with Raven 3.3.3 and the Sentry server is version 5.4.5. I put 'raven.contrib.django.raven_compat' in my INSTALLED_APPS and copied the LOGGING setting directly from the documentation: http://raven.readthedocs.org/en/latest/config/django.html I did not put register_signal(client) in my settings as the documentation said this will be setup automatically if djcelery is in your INSTALLED_APPS. Is there anything else I should be doing?

Cheers and thanks for your help,
Ben

David Cramer

unread,
Apr 17, 2013, 4:10:31 AM4/17/13
to gets...@googlegroups.com
Do you have djcelery in your INSTALLED_APPS as well?
--
You received this message because you are subscribed to the Google Groups "sentry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getsentry+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Benjamin Gerdemann

unread,
Apr 17, 2013, 4:15:31 AM4/17/13
to gets...@googlegroups.com
Yes, djcelery is in my INSTALLED_APPS list and I'm using version 3.0.17.

Cheers,
Ben

David Cramer

unread,
Apr 17, 2013, 4:17:20 AM4/17/13
to gets...@googlegroups.com
You could try using register_signal, though really it should be doing it automatically since it detected djcelery in your INSTALLED_APPS.

Outside of that, It's hard for me to determine, though if it has an exception it **should** have a stack trace.

Another option is to do this:

sentry repair --owner=<your username>

Then visit the internal sentry project and see if theres an errors.

Benjamin Gerdemann

unread,
Apr 17, 2013, 4:43:05 AM4/17/13
to gets...@googlegroups.com
OK, after further investigation I discovered the problem. One of my libraries was catching an exception and re-logging it as an error with log.error() thereby losing all of the stack trace information that would have been kept if the exception was allowed to propagate. Thanks very much for your help, and sorry to get you involved in a problem that in the end had nothing to do with sentry...

Cheers,
Ben
Reply all
Reply to author
Forward
0 new messages