Provide a simple way to capture oops info from deep in the request

Bug #832477 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-oops-wsgi
Fix Released
High
Unassigned

Bug Description

It would be nice if there was a simple interface to allow a wsgi application to annotate the oops report with information from deep within the request handler.

Two examples mentioned on IRC were:

1. If the WSGI application has the concept of users, it could store the user name once it has determined the user identity.

2. if the WSGI application doesn't pass the exception information up the stack properly, it might have access to it deeper in the stack and be able to extract type, value and tb_text.

Rather than requiring users to write custom on_create hooks each time they come up with something like this, it would be useful to have a general purpose hook that could be used.

The standard way to pass information between layers of a WSGI application is through the WSGI environment. So one possible solution would be:

1. the python-oops-wsgi middleware adds an empty dictionary to the environment as "oops.data".
2. applications can add keys to this dictionary that should appear in the report.
3. python-oops-wsgi installs an on_create hook that copies data from this dictionary into the report.

Related branches

Changed in python-oops-wsgi:
status: New → Triaged
importance: Undecided → High
Changed in python-oops-wsgi:
status: Triaged → Fix Committed
Changed in python-oops-wsgi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.