Honeybadger Integration Guide

Honeybadger is an error management suite for Ruby on Rails applications. It collects error data from your application and displays it in a user-friendly format that makes tracking down and resolving issues faster and easier. By combining Honeybadger with PagerDuty, you can distribute information about these errors to your team through alerts and fix problems in record time.

Follow these instructions to configure Honeybadger with PagerDuty. If you have any questions or require assistance, please contact our support team.

In PagerDuty

    1. From the Configuration menu, select Services. 
    2. On your Services page:

      If you are creating a new service for your integration, click +Add New Service.

      If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click the +New Integration button.

    3. RS-Add-New-Service
      RS-Add-Integration-Existing-Service

    4. Select your app from the Integration Type menu and enter an Integration Name.

      If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.

    5. Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
      RS-Integration-Settings
    6. Copy the Integration Key for your new integration: RS_API_pd_3

    In Honeybadger

    1. Within the Honeybadger console, select My Projects.

    2. Select Add A Project.

    3. Enter in the relevant information and create your project.

    4. Create a site if you haven’t already created one. For this integration guide I created a Rails app using rails generate honeyroku Post title:string body:text and deployed it to Heroku.

    5. Follow the instructions as they apply within your environment to create a test alert.

    6. In this example, after running rails generate honeybadger --api-key [your_key] you should see a confirmation within your environment.

    7. Check your Errors page to confirm that a test error was successfully generated.

    8. Under the Settings tab, select Integrations.

    9. Select PagerDuty.

    10. Enter the Integration Key you copied from PagerDuty in the Api key field and click Save changes.

    11. Introduce an error inside your application. In this case, I changed the working Activerecord method post.destroy to the undefined method post.mestroy. I then committed the error to git, pushed it to Heroku, visited my site and clicked Destroy next to a post on the Posts index page.

    12. Verify that the error has appeared on your site.

    13. Check for the error in Honeybadger.

    14. Ensure that the PagerDuty integration has worked by checking for the incident in your account, if you haven’t already been notified by phone, SMS or email.

      Congratulations, you’re done!

    FAQ

    Can I attach multiple projects within Honeybadger to multiple services within PagerDuty?

    Yes, simply create multiple Honeybadger services in PagerDuty and configure each Honeybadger Rails project to use the desired integration key.