Honeybadger has an API to keep track of project deployments. Whenever you deploy, all errors for that environment will be resolved automatically. You can choose to enable or disable the auto-resolve feature from your Honeybadger project settings page.
Capistrano Deployment Tracking
In order to track deployments using Capistrano, simply require Honeybadger’s Capistrano task in your
If you ran the
honeybadger install command in a project that was previously configured with Capistrano, we already added this for you.
Adding options to your config/deploy.rb file allows you to customize how the deploy task is executed. The syntax for setting them looks like this:
set :honeybadger_env, "preprod"
You can use any of the following options when configuring capistrano.
||Honeybadger will report the name of the local user who is deploying (using
||Honeybadger reports the environment supplied by capistrano by default. Use this option to change the reported environment.|
||Honeybadger uses your configured API key by default. Use this option to override.|
||Run deploy notification task asynchronously using
||The api endpoint that receives the deployment notification.|
||The name of the honeybadger executable. Default: “honeybadger”|
||Skip loading the Rails environment during deploy notification.|
Heroku Deployment Tracking
Deploy tracking via Heroku is implemented using Heroku’s free deploy hooks addon. To install the addon and configure it for Honeybadger, run the following CLI command from your project root:
$ bundle exec honeybadger heroku install_deploy_notification
If the honeybadger CLI command fails for whatever reason, you can add the deploy hook manually by running:
$ heroku addons:add deployhooks:http --url="https://api.honeybadger.io/v1/deploys?deploy[environment]=production&deploy[local_username]=&deploy[revision]=&api_key=asdf" --app app-name
You should replace the api key and app-name with your own values. You may also want to change the environment (set to production by default).
Deployment Tracking via Command Line
We provide a CLI command to send deployment notifications manually. Try the following command for the available options:
bundle exec honeybadger help deploy
Ruby Deployment Tracking
You can also track a deployment from the honeybadger Ruby gem with
Honeybadger.track_deployment( env: Rails.env, revision: `git rev-parse HEAD`.strip, local_username: `whoami`.strip, repository: "firstname.lastname@example.org:user/example.git" )