Deploy tracking

You can send a notification to Bugsnag when deploying a new version of your application to correlate releases with error rates.

Using Capistrano

If you use capistrano to deploy your apps, check out the Capistrano deploy tracking guide

Using Rake

Use the Rake deployment guide to add a Rake task to your app to notify Bugsnag of new app deployments.

Using Heroku

You can easily add Bugsnag deploy tracking to your Heroku application by running the following command from your application’s directory:

$ bundle exec rake bugsnag:heroku:add_deploy_hook

If you have multiple Heroku apps, you can specify which app to add the hook for as with the HEROKU_APP environment variable:

$ bundle exec rake bugsnag:heroku:add_deploy_hook HEROKU_APP=my-app

Configuration

You can set the following environmental variables to override or specify additional deploy information:

Variable Description
BUGSNAG_API_KEY Your Bugsnag API key (required)
BUGSNAG_RELEASE_STAGE The release stage (eg, production, staging) currently being deployed.
BUGSNAG_REPOSITORY The repository from which you are deploying the code.
BUGSNAG_BRANCH The source control branch from which you are deploying the code.
BUGSNAG_REVISION The source control revision for the code you are currently deploying.
BUGSNAG_APP_VERSION The app version of the code you are currently deploying.

Using the API

If no preconfigured integration exists for your deployment configuration, the Deploy Tracking API can be integrated directly.