honeybadger-io/honeybadger-js — pull request #23 by jico (2014-05-29 21:55:25+00:00)
Title: Adds support for multi-app reporting

We run multiple Spine and Angular apps on the same page, alongside other libraries, which we want to all be able to report to their own Honeybadger project (if we need them to). What do you think of allowing multiple apps to register itself to `window.Honeybadger` and report errors for individual apps, rather than strictly single one?

This pull maintains backwards compatibility with the current API, so you can still configure a single app and notify with errors the same way. It does add an `app` option for `configure` and `notify` though, so you can do things like:

```coffee
Honeybadger.configure(app: 'app1', api_key: '123') # First call set as default project to report to
Honeybadger.configure(app: 'app2', api_key: 'abc')

try
# Something in app1
catch e
Honeybadger.notify(e, 'app1')
# alternatively
# Honeybadger.notify(e, { app: 'app1' })
# Honeybadger.notify({ error: e, app: 'app1' })
```

We're going to point to this fork in our projects for now, but thought it might be worth it to see if it's something you'd want to integrate. Let me know your thoughts!