Categorisation of events

We’ve got a particular third party component in our web app that causes 99% of our Sentry errors and is making it hard to see the other 1% of our web apps issues that we want to address. We don’t want to ignore those 99% because they will need to be addressed at some point, but is there some way to tag those particular events so they go into a separate bucket or category for later inspection and out of the main event listing?

Your best bet is to tag those errors with a particular tag and then filter that tag out in your issue stream (using !has:tagName as part of your search*). If you pin this search, it will become the default view when you open up your issue stream.

This is reasonably easy to to as long as it’s easy to tell by looking at the outgoing event payload which errors should get this tag and which shouldn’t. It would look like this:

  dsn: "YOUR DSN HERE",
  beforeSend: (event, hint) => {
    const shouldGetTag = "examine the event object to decide";
    if (shouldGetTag) {
      event.tags = { ...event.tags, tagName: "any value here" };
    return event;

You also might consider enabling the Dedupe integration, since if any one thing is producing 99% of your events, you’re probably ending up with lots of duplicates. Dedupe will prevent the SDK from sending two of the same error in row, so if you have something throwing a ton of identical events, this can cut down on your volume significantly.

* Note that in order to use the ! search constructor, you must be on Developer, Sponsored, Team, or Business.

1 Like

Perfect! Thanks :slight_smile: