[ckan-dev] Using sentry with ckan

Samuele Santi samuele.santi at trentorise.eu
Mon Feb 17 14:40:34 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/17/2014 02:46 PM, David Raznick wrote:
> Hello
> 
> Yes I have got sentry working with CKAN.  If you are running ckan 
> under apache with a wsgi file like: 
> https://github.com/ckan/ckan-packaging/blob/master/etc/ckan/default/apache.wsgi

>
> 
[...]

> You also have to set the ckan config file to have
> 
> full_stack = false
> 
> This will stop the pylons error middlewhere catching these errors
> and therefore all errors will get to sentry.
> 
> IMiddlewhere would work but it would not catch all possible errors
> as its too close to the centre of the middlewhere stack.  i.e if 
> repoze.who for example went wrong it would not catch it.   The
> above approach means that it catches everything as it is the
> outermost app.

Cool, I just wrote this
https://github.com/opendatatrentino/ckanext-sentry but your approach
seems to be definitely better..

I propose adding this to Ckan documentation, as it might be of
interest of others..

btw, I'd load sentry DSN from the configuration instead of sticking it
in the wsgi


Another question: did you configure logging too?
I found out that something like this
https://github.com/opendatatrentino/ckanext-sentry/blob/master/ckanext/sentry/plugin.py#L41
works when put in the IMiddleware, but apparently didn't work when put
in the .wsgi file.. that's kinda weird, but I'm going to investigate
further.


BTW, I'm also going to see if I can adapt this to work with gunicorn
too, in order to make it work in my development environment too..


Thanks


- -- 
Samuele Santi

Trento Rise
http://www.trentorise.eu/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTAh9iAAoJEGgM+6dff2m7jggQALRUB+hWxqEfCBOcBr+a6Rbu
paGahKHxMx4cRfL6RsQiC9/huMnKOJTnkaSwJItzpQjXlGLDr8LysIIvjF+sbOoY
H7pzFYb64jSX5wEqHs1dJ6y/ek4Lci7Z9vgZA61522BbEFv4xlxHu+Si/C0Z6n9r
ps8GYYXFzptycLq9gXLZGvIg4YuZqVCToRbMJDl8pvAHvQcBSoraLHP2LNakQymx
sYgwxXv5vo11S+RiRAwrziVzpjNhnSGDygWk4nX50i2F9BNhpZj9Yg97yaWhA6w9
mXiIRp6XlLL9UBg+w40uVfigkQY2s7BjfUARMuyhqiLBow3jLfp1ZS8Qx7P/9XbO
ZOIaOycyXXQAjal+aHJdduAeebWVAIv5KdrYuZz3a6HbQHs9l0vjFAZModX8+Uw1
75DGSp9F5XtObPIkXsen4jEC+0LUpU5W+tYmYPofcyjjiixNhBtZZ5wQEv7ld9yp
mTZawcRSgoMWzIV/sG2/di3yRgV/X8wHtjGCLOseimf7x6Nv3IzqI4Bl2JNxWpTw
uIfe/kuHw3DLQbff5rtFfH6iqlBtBag7nlkII8zwauxUyjL1WvQz4CqNG/7ue2cn
l+xIeU2XXa8QfY9feTDt7aYqy++S0o8xlgopz20DAsxpdfX1vMOvXxQ0zXrCZak9
GPXOXMjxF1SmuAUfNFXU
=hXlr
-----END PGP SIGNATURE-----



More information about the ckan-dev mailing list