Sentry Integration

95 views
Skip to first unread message

Moritz Schlarb

unread,
May 6, 2013, 5:18:09 AM5/6/13
to TurboGears
Hi there everyone,

I wanted to try out Sentry[1], and so far I'm amazed!
It gives me a centralized and organized collection of all log entries
and stacktraces, which is awesome.

For integrating it with TurboGears, I simply added the Client middleware
(with a configuration wrapper for Pylons)[2] like this:
https://gist.github.com/moschlar/5523905#file-app_cfg-py

From the stacktrace that I got by mail[3], it can be seen that the Raven
middleware is injected *below* WebError, so all exceptions that would
bubble up should go through Raven, too, right?

But on the Sentry project page, I only see log messages - no exception
stack traces.
I've already verified that the handle_exception method within Raven gets
called - but for some obscure reason, Raven doesn't seem to send the
stacktrace.
When I asked in #sentry on Freenode, drcamer didn't have a clue on why
this could happen, my only guess is, that somehow the middleware from
TurboGears interferes with the Raven middleware.

Is the ErrorMiddleware doing something special to sys.exc_info which
would prevent the stack trace from being seen at a lower layer in the
WSGI stack? (Which doesn't seem to make sense... :-/)

Does anyone have an idea?

Best wishes,
Moritz

[1]: http://sentry.readthedocs.org/en/latest/
[2]: http://raven.readthedocs.org/en/latest/config/pylons.html
[3]: https://gist.github.com/moschlar/5523905#file-stacktrace-py
--
Moritz Schlarb

damien....@free.fr

unread,
May 6, 2013, 5:59:47 AM5/6/13
to turbo...@googlegroups.com
Hi all,

A small feedback about the "who's using turbogears" page which has broken links - http://www.turbogears.org/whos-using.html

Here are the ones I found having problems :

- Sourceforge : link is http://sourceforge.net/p/allura/home/
-> should be http://sourceforge.net/p/allura or http://sourceforge.net/p/allura/wiki/Allura%20Wiki/
- ESOF2010 Media Gallery - Video gallery of the events at the European Science Open Forum
-> not available anymore
- LSCube - Web Interface to the LSCube project streaming suite media gallery has been made with Turbogears
-> the website is half-dead
- Accolade - Millions of students take the SAT test each year in the US, and Accolade wants to help you score your best. TurboGears helps Accolade deliver the training that students need for that winning edge.
-> the domain is parked
- Paris Envies - a social website to share your preferred party places in Paris is TurboGears powered. This web site also works with mobile devices so that you can always locate a nice bar or restaurant near you even with a “simple” phone
-> not available anymore ?
- MeCommerce makes it easy to earn 50% of the profit selling from a wide array of items on your website.
-> dead
- My Drawings provides a social network for people to share their drawings.-
-> seems to be dead

I feel broken links make "this techno is not up-to-date and actively supported", so I would remove/update these links.

What do you think ?


Damien

Moritz Schlarb

unread,
May 6, 2013, 7:12:33 AM5/6/13
to TurboGears
And one thing is odd:

In an interactive stacktrace (with debug=true), I see that in
raven.middleware, execution is at line 30, which is

def __call__(self, environ, start_response):
try:
>>>> iterable = self.application(environ, start_response)
except Exception:
self.handle_exception(environ)

Why does this exception not get caught?!

Alessandro Molina

unread,
May 15, 2013, 7:23:30 AM5/15/13
to TurboGears .
Thanks,
removed the broken links and updated the changed ones.

If anyone wants to suggest website to list there feel free to do so.




--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



Moritz Schlarb

unread,
Jun 11, 2013, 3:14:52 PM6/11/13
to turbo...@googlegroups.com
I tried a fresh start with the Sentry integration and I got it working now with the default WSGI middleware that is offered by Raven.

But still, when I try to use the part that tries to take the URL configuration from the Pylons config file, it fails because I could nowhere get values from the config file apart from the DEFAULT and app:main sections.
(In global_conf and app_conf in project/config/middleware.py).

How could I get other sections (mainly the sentry one) from the chosen config file?
Any ideas?

Greetings,
Moritz
Reply all
Reply to author
Forward
0 new messages