How to receive notifications based on affected person in Rollbar

266 Views Asked by At

I'm wondering if there's an appropriate way to receive notifications (email, slack, or even a sound notification, etc...) whenever a Rollbar error is created for a very specific Affected Person/People.

For example, let's say I wanted a notification whenever dean had a new occurrence of an error. Would that be something that's best done in Rollbar itself or is there a script that / API that I can call that could do all of this?

Rollbar Affected People Page - https://rollbar.com/wp-content/uploads/2021/05/Screen_Shot_2021-03-10_at_10.19.49_AM.png

1

There are 1 best solutions below

0
Brian Rue On

In Rollbar, you can set notification rules to filter by any parameters in the data you send, including the affected person.

Here's an example rule to send an email to Rollbar user "brianr" (that's me) whenever the person "dean" experiences an occurrence level "error" and above:

Screenshot of example Every Occurrence rule filtering on person.username

In the Rollbar UI, this can be set up at [Project Settings] > Notifications > [Name of channel where you want the notification] > add a rule and then configure with filters as shown above. The part that filters on person is the path filter with path body.person.username and value dean.

It's also possible to configure these rules via the Rollbar API, using e.g. PUT /api/1/notifications/email