honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 26 forks source link

Reset context after request. #9

Closed joshuap closed 8 years ago

joshuap commented 8 years ago

For Rails we automatically clear the global context after each request. Would this be desirable for Django, or does the context manager work differently? Would it be useful to be able to persist context outside of each request?

demsullivan commented 8 years ago

The way the middleware is currently set up, this isn't applicable, since we're creating a new instance of Honeybadger for every request. However, if we update the middleware to use the global singleton instead, then this makes sense. If you haven't found it useful to persist the context outside of requests in other frameworks, I'd say Django would be no different. Will implement that once I convert the middleware to use the global singleton.

joshuap commented 8 years ago

:+1: