You're two weeks into using Rollbar. You've watched in amazement as issue after issue comes in without a single customer complaint to accompany them. How did you ever find errors before!?
Now that your unresolved errors have drastically decreased, you've started to notice a handful of Rollbar items that all seem to be exactly the same issue. Maybe you've been notified that your UI has exceeded the maximum call stack when calling a particular function. And in one case you found out that your database is actually missing several columns which got grouped into a single error.
What's a new Rollbar user to do? Here's 6 steps to help you improve your error grouping in Rollbar:
1. Learn how Rollbar groups items.
The Rollbar grouping algorithm attempts to be as smart as possible by grouping items by root cause. Error type items are grouped by a combination of platform, environment, error class, and stack trace information. Message type items are grouped by message text after stripping out certain number-like and date-like portions of the message.
2. Customize your error grouping.
Custom grouping enables you to decide exactly how Rollbar will group your items. You can alter the title, change the fingerprinting (and therefore the grouping), and use any data you send to us to make it work!
3. Make sure you're setting the server root.
Before grouping by filename, Rollbar will strip off whatever you're sending in the server root segment. This means that you can host the code from varying locations, but still get the same grouping, no matter where on the system you host your code. Each notifier allows setting this in its own way. Check out the docs for your notifier to learn how!
4. Consider customizing your stack trace before sending.
The rollbar.js, rollbar-gem, and several of our community notifiers have the ability to alter the error payload being sent to Rollbar just before sending them. Almost all of them can send custom data. If you have a specific case where you know how to make the payload get grouped correctly (by stripping out repeated stack frames in a recursive function, or normalizing a dynamically named function) you can alter the stack trace before it's sent to get it to work with our default grouping algorithm. If the alteration is just too complex, consider sending a custom data field and using custom grouping to group on that when present. There are tons of ways to get this exactly right. Don't settle for anything less.
5. Send a fingerprint.
Sometimes you know exactly how an item should be grouped in Rollbar, and there's no simple way to express that in a custom grouping rule. In this case all our official notifiers, and most community ones, have a way to send a fingerprint that is the field we group by to determine what item an occurrence gets grouped with. The field can be up to 40 characters long. If you go over, that's fine! Our system will hash it to ensure it fits. This will almost never result in a collision, so feel free to have a fingerprint like "the-error-that-occurs-when-we-send-a-bad-id-to-stripe-for-customer:BIGNAME". We'll take care of making it fit!
6. Ask for help!
Email us at email@example.com. We'd be happy to help you set things up for your unique situation.
If you haven’t already, signup for a 14-day free trial of Rollbar and let us help you defeat annoying errors in your applications. :-)