Tag exceptions automatically to unlock great power

If you use Honeybadger, you may have come across "tags" in the UI. Tags are the key that unlocks a lot of advanced functionality in Honeybadger.

For example, imagine that there are a couple of errors that you want to procrastinate on. You can tag them "later," and then tell honeybadger to stop sending you alerts on errors with that tag. Once you're ready to deal with them, enter tag:later   into the search box to retrieve them.

This manual approach doesn't scale very well though. That's why we let you add tags to errors in your Ruby code.

Suppose you have a job queue like Sidekiq, and you want to treat errors from the job queue differently than errors from your main app.

Just add the following code, and every error that happens in Sidekiq will be tagged "sidekiq."

Honeybadger.context(tags: 'sidekiq')

**Note: **this requires version 2.x of the Honeybadger gem. Here are instructions for upgrading from 1.x to 2.x.

You can verify that tags are being added by looking at the UI:

Tag UI

Now that the tags are in place, you have a lot of options. You can easily add rules to:

  • Turn off alerts for sidekiq errors in staging

  • Send sidekiq errors to a special Slack chat room

  • Send sidekiq errors to a certain member of your team

To do this, you'll use our advanced search syntax combined with search filters for notifications.

Here's an example showing how I'd disable email alerts for errors with the tag "sidekiq"

advanced search filter

If you have any questions about how to use these features, just drop us a line at support@honeybadger.io.

What to do next:
  1. Try Honeybadger for FREE
    Honeybadger helps you find and fix errors before your users can even report them. Get set up in minutes and check monitoring off your to-do list.
    Start free trial
    Easy 5-minute setup — No credit card required
  2. Get the Honeybadger newsletter
    Each month we share news, best practices, and stories from the DevOps & monitoring community—exclusively for developers like you.
    author photo

    Starr Horne

    Starr Horne is a Rubyist and Chief JavaScripter at Honeybadger.io. When she's not neck-deep in other people's bugs, she enjoys making furniture with traditional hand-tools, reading history and brewing beer in her garage in Seattle.

    More articles by Starr Horne