Commit Graph

18 Commits

Author SHA1 Message Date
Armin Ronacher 80b24acc33 Extension to #686 to also log keyboard interrupts. 2015-11-13 08:32:20 +01:00
Matt Robenolt 3eddaa4dff Log SystemExit in wsgi middleware when code != 0
SystemExit does not subclass Exception, so we don't catch this.
SystemExit manifests itself (at least) from gunicorn when gunicorn
attempts to gracefully shut down a worker process. See GH-675 for more
background.

Fixes: GH-675
2015-11-12 17:20:16 -08:00
David Cramer 504597fb2a Clear context at end of request cycle 2014-01-04 14:45:55 -08:00
David Cramer 622a7f7f0b Overhaul Flask implementation 2013-12-05 12:02:56 -08:00
David Cramer 6f03dee429 New context() API
This makes the API much easier to use, and resembles the raven-ruby implementation. Users can continually merge context (generally within their middleware), and simply need to call context.clear() to refresh it.

The following APIs are added as part of this changeset:

```
Client.context -- the accessible context instance
>>> Client.context.get()

Client.context.clear() -- flush the current context
>>> Client.context.clear()

Client.user_context() -- a shortcut to set the user interface
>>> Client.user_context({'email': 'foo@example.com'})

Client.tags_context() -- add additional tags to context (or overwrite an existing tag)
>>> Client.tags_context({'key': 'value'})

Client.extra_context() -- add additional data to context (or overwrite an existing key in the data)
>>> Client.extra_context({'key': 'value'})
```
2013-12-02 20:08:51 -08:00
David Cramer 4b1a4d4d42 Require absolute import statements on files 2013-06-15 13:57:40 -07:00
Matt Robenolt 86c663c259 Instantiate a default Client in the WSGI middleware
Makes client optional. If left off, initialize the default Client()
2013-04-02 22:11:18 -07:00
David Cramer 3bc464183b Switch some calls off of capture and onto their correct counterparts 2012-12-26 13:28:58 -08:00
David Cramer eefeac4db8 Remove print statement 2012-10-22 12:42:28 -07:00
David Cramer 13260b0f5b its not 2010 anymore 2012-10-12 10:45:59 -07:00
David Cramer eb6171a248 Ensure Sentry wsgi middleware calls close 2012-10-12 10:45:07 -07:00
David Cramer aea4dc2cd5 Dont require webob in wsgi middleware 2012-01-30 00:41:24 -08:00
David Cramer 5f2b7c6c9b Merge branch 'master' of https://github.com/mvantellingen/raven into mvantellingen-master 2012-01-30 00:33:21 -08:00
David Cramer 46f42f9e87 pep8 2012-01-30 00:30:31 -08:00
David Cramer 1e2f98526b Some initial work on generic WSGI async support 2012-01-28 11:50:45 -08:00
Michael van Tellingen bd19a43dd0 Improve the WSGI middleware handler by using webob and add unittest 2012-01-22 14:33:18 +01:00
David Cramer 4977828e8e Changed Flask support to use got_request_exception 2011-10-07 15:24:23 -04:00
David Cramer 258e3c0df3 sentry_client -> raven 2011-10-07 13:57:45 -04:00