Question

I'm upgrading raven to 2.0.3, but can not see any logs make it through onto the server. I've patched raven so that I can use celery: https://github.com/getsentry/raven-python/commit/1be659a1eba721a29ca889e632538ddd459c4acf.

The SENTRY_DSN must be getting picked up, because when I change it celery is showing 403 responses (forbidden from the server). The tasks are getting picked up by celery because I can see tasks being completed successfully in the logs:

[2012-08-06 13:28:20,885: INFO/MainProcess] Got task from broker: raven.contrib.django.celery.send_raw[f58d441c-713b-4d90-9a75-fcdaf753cd5b]
[2012-08-06 13:28:21,061: INFO/PoolWorker-1] Configuring Raven for host: http://xxxxxx@xxxx.dotcloud.com:/2
[2012-08-06 13:28:22,025: INFO/MainProcess] Task raven.contrib.django.celery.send_raw[f58d441c-713b-4d90-9a75-fcdaf753cd5b] succeeded in 0.966000080109s: None

However, I can not see any events on the sentry server. Server side I have:

Django==1.4.1
django-celery==3.0.4
raven==2.0.3
sentry==4.8.6
celery==3.0.5

Is there some setting that is missing?

Was it helpful?

Solution

Problem was that my logging setup was most probably causing some sort of race condition, which meant that Raven would print that it was sending logs, but never actually got around it.

Fixed by setting CELERY_REDIRECT_STDOUTS = False

See https://groups.google.com/forum/?fromgroups#!topic/celery-users/6_Suz2tscMQ

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top