Skip to main content

Rate limiting based on the environment

Updated over a month ago

Issue

Can I configure a rate limit for my application based on the environment? For example, I want to receive 100 errors per hour for the staging environment, and I don't want any limit for the production environment.

Applies To

  • All SaaS Customers

  • Rate Limits

Resolution

Unfortunately, it is not possible to apply rate limiting in the Sentry Web UI that would be different for each environment.

The only method you can apply is to create a beforeSend callback where you can apply custom logic based on the environment, and then decide whether the event should be sent or not. However, this will apply only in the scope of the current runtime, and not the total amount of events that you are sending to Sentry.

Did this answer your question?