This add-on is operated by Bugsnag Inc
Focused and powerful error monitoring for web, mobile, and server apps
Last updated March 01, 2018
Table of Contents
Bugsnag lets you know which exceptions are happening most frequently, which users are affected, and what kinds of inputs cause problems. We notify you by email, PagerDuty, and Slack the first time an exception happens and include enough information that you can find and fix bugs quickly and easily. We also integrate with bugtrackers and project management tools like Github Issues, Pivotal Tracker and JIRA so that your entire team can see what needs to be fixed.
Bugsnag is accessible via an API and has supported client libraries for Ruby, Python, Node.js, Java, and many other languages.
Provisioning the add-on
Bugsnag can be attached to a Heroku application via the CLI:
A list of all plans available can be found here.
$ heroku addons:create bugsnag
-----> Adding bugsnag to sharp-mountain-4005... done, v18 ($39/mo)
Once Bugsnag has been added a
BUGSNAG_API_KEY setting will be available in
the app configuration and will contain the api key needed to talk to the
bugsnag API. This can be confirmed using the
heroku config:get command.
$ heroku config:get BUGSNAG_API_KEY
Most of the Bugsnag client libraries will automatically read this environment variable and will start sending unhandled exceptions to Bugsnag as soon as they are deployed.
If you want to test Bugsnag in development you need to export the same
as we have provisioned in production.
Use the Heroku Local command-line tool to configure, run and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a
.env file. To view all of your app’s config vars, type
heroku config. Use the following command to add the
BUGSNAG_API_KEY values retrieved from heroku config to your
$ heroku config -s | grep BUGSNAG_API_KEY >> .env
$ more .env
A slightly less portable way of achieving the same thing is to just
export BUGSNAG_API_KEY=value in a terminal before starting your app.
Credentials and other sensitive configuration values should not be committed to source-control. In Git exclude the .env file with:
echo .env >> .gitignore.
For more information, see the Heroku Local article.
Using with supported languages
Bugsnag supports over 50 programming languages and platforms. For a complete list and instructions on how to integrate, please see the Bugsnag platform documentation.
For more information on the features available within the Bugsnag dashboard please see the docs at docs.bugsnag.com.
The Bugsnag dashboard allows you to see which exceptions are currently affecting your app, how frequently, and how severely. You can use it as a debugging tool for finding out what conditions cause exceptions, a todo list for prioritizing which bugs to fix, or a status page that gives you a feel for how buggy or not your app is.
The dashboard can be accessed via the CLI:
$ heroku addons:open bugsnag
Opening bugsnag for sharp-mountain-4005…
or by visiting the Heroku Dashboard and selecting the application in question. Select Bugsnag from the Add-ons menu.
If you do not seem to be seeing any exceptions in Bugsnag, it’s worth checking that you have installed the notifier library and it is configured correctly.
For Rails apps, for example, this can be done by running our rake task.
$ heroku run rake bugsnag:test_exception
For other languages and platforms, just add a manual Bugsnag notification call to your app.
Migrating between plans
heroku addons:upgrade command to migrate to a new plan.
$ heroku addons:upgrade bugsnag:full
-----> Upgrading bugsnag:full to sharp-mountain-4005... done, v18 ($99/mo)
Your plan has been updated to: bugsnag:full
Removing the add-on
Bugsnag can be removed via the CLI.
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy bugsnag
-----> Removing bugsnag from sharp-mountain-4005... done, v20 ($39/mo)
Before removing Bugsnag you can download any data you want to keep using the API.