bpollack / fogbugz-middleware

Django middleware that automatically posts errors to FogBugz

FogBugzMiddleware

By default, Django sends emails for 500 errors. Simply directing these emails to go to FogBugz can be problematic: FogBugz will attempt to respond to the email, which will fail if you are sending messages from, e.g., do-not-respond@example.com. FogBugz then generates a case for the failed email.

The solution is to use FogBugz' ScoutSubmit functionality, which is explicitly designed to handle this situation. ScoutSubmit not only won't send the bogus response emails; it also allows you to customize which project, area, and assignee to use for the bugs, and allows automatically coalescing these bugs based on their descriptions.

Installation

Simply run python setup.py install, as you would for any other Python project.

Usage

First, you'll need to set up some parameters for FogBugzMiddleware to work. These settings are:

Next, add FogBugzMiddleware to MIDDLEWARE_CLASSES in settings.py:

1
2
3
4
5
6
MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'fogcreek.fogbugz.FogBugzMiddleware',
)

That's it.

Bugs

Report bugs and submit feature requests at https://bqb.fogbugz.com/default.asp?pg=pgPublicEdit.


This revision is from 2009-06-04 02:15