new user; problems with sentry.client.celery.CelerySentryClient

70 views
Skip to first unread message

Chris Gough

unread,
Sep 7, 2011, 10:16:31 AM9/7/11
to disqus-o...@googlegroups.com
Sentry works for me with with base.SentryClient, log.LoggingSentryClient and async.AsyncSentryClient, but I can't get celery.CelerySentryClient to work. My environment is debian-squeeze, python 2.7.1 with sentry 1.9.0, djcelery 2.3.3 and django 1.2.5.

I have RabbitMQ running, and I start celeryd like this:

# python manage.py celeryd -l info
[2011-09-07 08:54:34,081: WARNING/MainProcess] 

-------------- celery@lapfu v2.3.1
---- **** -----
--- * ***  * -- [Configuration]
-- * - **** ---   . broker:      amqplib://guest@localhost:5672/
- ** ----------   . loader:      djcelery.loaders.DjangoLoader
- ** ----------   . logfile:     [stderr]@INFO
- ** ----------   . concurrency: 2
- ** ----------   . events:      OFF
- *** --- * ---   . beat:        OFF
-- ******* ----
--- ***** ----- [Queues]
 --------------   . celery:      exchange:celery (direct) binding:celery
                 

[Tasks]
  . celerytmp.tasks.add
  . sentry.client.celery.tasks.send

[2011-09-07 08:54:34,090: INFO/PoolWorker-1] child process calling self.run()
[2011-09-07 08:54:34,093: INFO/PoolWorker-2] child process calling self.run()
[2011-09-07 08:54:34,096: WARNING/MainProcess] celery@lapfu has started.


celerytmp.tasks.add is an almost empty django app with a hello-world type djcelery task (as-per celery docs, adds two numbers), when I call it from manage.py shell it works and I see the method execution logged in the celeryd output.

When I set SENTRY_CLIENT='sentry.client.celery.CelerySentryClient' to my settings.py, it fails silently. I can't find the error messages - not in sentry, no evidence in celeryd output. This command:

sudo /usr/sbin/rabbitmqctl list_queues

shows this:

Listing queues ...
celery    0
lapfu.celeryd.pidbox    0
...done.

I don't know how to move ahead, what should I try next?

Thanks in advance,

Chris Gough

David Cramer

unread,
Sep 7, 2011, 12:56:05 PM9/7/11
to disqus-o...@googlegroups.com
Do you also have sentry.client.celery in your INSTALLED_APPS ?
--
David Cramer
http://disqus.com/zeeg
http://twitter.com/zeeg

Chris Gough

unread,
Sep 7, 2011, 7:55:25 PM9/7/11
to disqus-o...@googlegroups.com
Yes, the last 5 items in INSTALLED_APPS are (in this order):
'djcelery', 'celerytmp', 'sentry', 'sentry.client' and
'sentry.client.celery'

I assume the first four are fine because the other SENTRY_CLIENT
options work, and my celerytmp app works (well, I can remotely invoke
it's task.add via the manage.py shell).

I also have this in my settings.py

LOGGING = {
'version': 1,
'disable_existing_loggers': true,
'handlers': {
'sentry': {
'level': 'DEBUG',
'class': 'sentry.client.handlers.SentryHandler',
'formatter': 'verbose'
}
},
'loggers': {
'()': {
'level': 'WARNING',
'handlers': ['sentry']
}
}
}

and I have a view (called "bang_error") that deliberately raises an
exception, so I can reliably reproduce the problem by adjusting one
setting, hitting "bang_error", checking sentry for the error.

I haven't changed MIDDLEWARE_CLASSES from the default (what
django-admin startproject gave me), but obviously I've got a database
and templates confgured. I see from sentry/client/handlers.py that
SentryHandler depends on SentryLogMiddleware, so as a guess I tried
adding it to MIDDLEWARE_CLASSES but it didn't help so I took it out
again.

I have a call to djcelery.setup_loader() at the top of my settings.py
too, I think that's about the last change I made to a fresh django
project. I'm running it via manage.py runserver.

Chris Gough

--
.

Kevin Postal

unread,
Sep 7, 2011, 8:16:45 PM9/7/11
to disqus-o...@googlegroups.com
I was having problems with Celery and Sentry as well.

Sorry I'm not able to provide more details. But everything was working
with Version: '1.6.0'

Chris Gough

unread,
Sep 12, 2011, 2:15:18 AM9/12/11
to disqus-o...@googlegroups.com
Hi, sorry for the delay, still haven't got sentry / celery working.

I downgraded sentry to 1.6.0 (and added 'paging' and 'indexer' to
INSTALLED_APPS, etc), but basically failed to get this combination of
versions working at all.
Can anyone specify a combination of django/python/sentry/celery
versions that are known to work together?

Chris Gough

--
.

Reply all
Reply to author
Forward
0 new messages