3

I'm using Sentry to log my errors, but there are errors I'm not able to fix (or could not be fixed by me) like

OSError (write error)

enter image description here

Or error that come from RQ (each time I deploy my app)

enter image description here

Or client errors (which are client.errors)

enter image description here

I can't just ignore them because I consume all my quota. How I can filter out this errors?

Here some references for interested people.

realnot
  • 721
  • 1
  • 11
  • 31

3 Answers3

1

I created a Gist for rate limiting the amount of events that are being send to Sentry:

https://gist.github.com/jurrian/e22f8e724b8499a29c5537e956f0dc7f

It uses ratelimitingfilter which can be configured to set a rate per minute, and additionally add a burst to start rate limiting after a number of events.

Jurrian
  • 532
  • 4
  • 14
0

I get the same errors, but i never had any problems with my quota. But if you really want to filter it, you can just do it in your sdk:

https://docs.sentry.io/error-reporting/configuration/filtering/?platform=python

But beware, this could hide other errors as mentioned here: https://github.com/pypa/warehouse/issues/679

ChrisRob
  • 1,515
  • 2
  • 18
  • 30
0

To safe yourself some quota, you have two options:

  1. Avoid forwarding events client side, thus preventing events being send to sentry at all. Have a look at the docs for available client-side filters. The drawback with this approach is of course that you need a new code deployment for any adjustment of client-side filters and some clients may not instantly reflect your code changes.
  2. Avoid forwarding events on sentry's side, via inbound filters ([Project] > Project Settings > Inbound Filters). According to the sentry documentation on quota usage, events filtered via inbound filters are not affecting your quota.

Inbound filters include:

  • Common browser extension errors
  • Events coming from localhost
  • Known legacy browsers errors
  • Known web crawlers
  • By their error message
  • From specific release versions of your code
  • From certain IP addresses

Business plans and above also allow to filter events by error messages.

Felix K.
  • 14,171
  • 9
  • 58
  • 72