Published on

Implementing Project-Level Rate Limiting in Sentry


If your product is customer-facing, like a chat widget or embed, and you're using Sentry for error tracking, you need to make sure you've properly configured it.

Without proper configuration, you might quickly use up your quota for Sentry (all projects combined) even for errors that are not directly related to your product.

For example, let's say you're using ReCaptcha in your app and it goes down for some time. You'll get flooded by error tracking and end up using most of your quota for that, even though the error might not be that important or relevant to your app.

This could lead to a situation where other valid errors are dropped because you have reached your quota limit.

How do we handle such case?

To handle these cases, we can configure rate-limiting at the project level.

Custom Rate Limits are available to Business plans and above only in Sentry.

How to Configure Project Level Rate Limiting?

Here's how to do it:

  1. Go to Projects in the navbar.
  2. Select your project.
  3. Go to Project Settings by clicking on the icon
  4. Go to Client Keys (DSN) and click on the Configure button.
  5. Configure your rate limit based on your preference (ideally hourly).

And here are some screenshots for your reference:

Happy efficient workflows!