Logging Events in HoneyBadger

Honeybadger Now Supports Logging and Event Monitoring

Honeybadger recently added support for logging and event monitoring. It's one feature that I've been waiting for a while now, and I recently stumbled upon it randomly yesterday. This post shows how you can log events from your Rails apps to Honeybadger.

2 min read
💡
Disclaimer: This is not a sponsored post. Honeybadger has not paid me anything to write it.

I've been using Honeybadger for a while now on my Rails applications (both personal, hobby projects and for clientwork). I mainly use it for error and uptime monitoring. Both features work really great, and I really like their simple offerings and intuitive UI.

For a long time, I've been waiting for a simple hosted log management solution from them, and I recently stumbled across it while reading their docs. It's called Insights and you can read the docs here. I really like the following marketing copy, which helped clear some confusion I had about the related jargon.

Logging Events
Logging Events

The setup is dead-simple for Ruby and Rails applications. Just three simple steps:

Step 1: Install the Ruby gem:

$ bundle add honeybadger

Step 2: Set up the API key for the gem:

$ bundle exec honeybadger install [Your project API key]

Step 3: Start logging events in your Rails app:

Honeybadger.event("SUCCESS", { message: "A new customer just signed up" })

That's it.

Now you can access the Honeybadger dashboard to access and filter all your logs. They also provide a query language (called BadgerQL) that enables you to query logs. 

Logging in Honeybadger
Logging in Honeybadger

If you're curious to learn more, here's the PR that added the event interface in the Ruby gem.

💡
Again, to reiterate, this was not a sponsored post. Although I get a ton of affiliate queries and sponsorship requests to promote products (or put ads) on this blog, I really value my readers (and I mean you all!), and the integrity and the reading experience of this blog, and only recommend or suggest products and software that I personally use and love. Honeybadger is one of them.

Also, I've learned so much from their blog (thank you for all your articles, Starr Horne, and I wish you'd resume writing again!) and hence wanted to spread some love by sharing this new feature, more so, since I haven't seen any blog posts or announcements yet, and I've been waiting for logging support for a long time.

Anyway, that's it for today. If you use Honeybadger, start logging your events now.


That's a wrap. I hope you found this article helpful and you learned something new.

As always, if you have any questions or feedback, didn't understand something, or found a mistake, please leave a comment below or send me an email. I reply to all emails I get from developers, and I look forward to hearing from you.

If you'd like to receive future articles directly in your email, please subscribe to my blog. Your email is respected, never shared, rented, sold or spammed. If you're already a subscriber, thank you.