sunlightlabs/scout — pull request #487 by konklone (2014-04-11 22:48:08+00:00)
Title: Added Sentry as an option for exception handling

This adds support for [Sentry](https://getsentry.com) as an error handler. If the `sentry` option in `config.yml` is not provided, the app fall back to normal SMTP.

The logical fork is placed in a new method, `Admin.exception`, that accepts a `source`, `exception`, and arbitrary `extra` data to be included. If Sentry is configured, it will be used, otherwise it will use SMTP.

There is one other place where Sentry configuration is checked, in the web error handler. This will add some extra request-level information if not using Sentry. Otherwise, it omits them, because Sentry will do a better and more comprehensive job at it.