Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Bugsnag
Bugsnag

This add-on is operated by Bugsnag Inc

Focused and powerful error monitoring for web, mobile, and server apps

Bugsnag

Last updated March 01, 2018

Table of Contents

  • Provisioning the add-on
  • Local setup
  • Using with supported languages
  • Dashboard
  • Troubleshooting
  • Migrating between plans
  • Removing the add-on
  • Support

Bugsnag is an add-on for tracking your application’s exceptions in production.

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
70d9b0852a968b1d0d0e329b5507f287

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.

Local setup

Environment setup

If you want to test Bugsnag in development you need to export the same BUGSNAG_API_KEY 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 .env file.

$ 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.

Dashboard

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.

Troubleshooting

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

Use the 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.

Support

All Bugsnag support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome by email.

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Ziggeo ButterCMS

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences