Honeybadger

This add-on is operated by Honeybadger Industries LLC

Modern error management and monitoring for Ruby and Rails

Honeybadger

Last Updated: 06 January 2014

Table of Contents

Honeybadger is an add-on for tracking and reporting on errors triggered by your applications.

Rather than getting an email every time a user trips the same error in your app (or worse, not even knowing when your users encounter an error), Honeybadger groups every error occurrence by the type of error encountered and notifies you only once per error. You’ll get an email (or a Campfire notice, or a text message) the first time the error occurs.

The goal of Honeybadger is to get your error notifications to you as quickly as possible, and show the error info to you as clearly as possible, so you can fix the problems in your app in no time and delight your customers.

Provisioning the add-on

Honeybadger can be attached to a Heroku application via the CLI:

A list of all plans available can be found here.

$ heroku addons:add honeybadger
-----> Adding honeybadger to sharp-mountain-4005... done, v18

Once Honeybadger has been added a HONEYBADGER_API_KEY setting will be available in the app configuration and will contain the api key that the gem uses to authenticate with the Honeybadger server.

$ heroku config | grep HONEYBADGER_API_KEY
HONEYBADGER_API_KEY    => abc123

After installing Honeybadger the application should be configured to fully integrate with the add-on.

Using with Rails 3.x

Ruby on Rails applications will need to add the following entry into their Gemfile specifying the Honeybadger client library.

gem 'honeybadger'

Update application dependencies with bundler.

$ bundle install

Once the gem is installed, create the file config/initializers/honeybadger.rb in your Rails project with this content:

Honeybadger.configure do |config|
  config.api_key = ENV['HONEYBADGER_API_KEY']
end

Using with Rack

In order to use honeybadger in a non-Rails rack app, just load honeybadger, configure your API key, and use the Honeybadger::Rack middleware:

require 'rack'
require 'honeybadger'

Honeybadger.configure do |config|
  config.api_key = ENV['HONEYBADGER_API_KEY']
end

app = Rack::Builder.app do
  run lambda { |env| raise "Rack down" }
end

use Honeybadger::Rack
run app

Using with Sinatra

Using honeybadger in a Sinatra app is just like a Rack app:

require 'sinatra'
require 'honeybadger'

Honeybadger.configure do |config|
  config.api_key = ENV['HONEYBADGER_API_KEY']
end

use Honeybadger::Rack

get '/' do
  raise "Sinatra has left the building"
end

Confirm configuration

Configuration of the add-on can be confirmed by running:

$ heroku run rake honeybadger:test

Dashboard

For more information on the features available within the Honeybadger dashboard please see the Honeybadger docs.

The Honeybadger dashboard allows you to configure your notification preferences, including the email address that should be used for sending errors to you, configuration for other notification methods like Campfire, and so on. You can, of course, also use the dashboard to review the errors your app has generated and sent to Honeybadger.

The dashboard can be accessed via the CLI:

$ heroku addons:open honeybadger
Opening honeybadger for sharp-mountain-4005…

or by visiting the Heroku apps web interface and selecting the application in question. Select Honeybadger from the Add-ons menu.

Migrating between plans

Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade honeybadger:corporate
-----> Upgrading honeybadger:corporate to sharp-mountain-4005... done, v18 ($49/mo)
       Your plan has been updated to: honeybadger:corporate

Removing the add-on

Honeybadger can be removed via the CLI.

This will destroy all associated data and cannot be undone!

$ heroku addons:remove honeybadger
-----> Removing honeybadger from sharp-mountain-4005... done, v20 (free)

Support

All Honeybadger support requests should be sent to support@honeybadger.io.

Additional resources

Additional resources are available at: