Spike Protection: Minimum Event Calculation capes project count to 5, even when having 100 projects in contract - flexibility needed
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 586
Description
### Problem Statement
> https://docs.sentry.io/pricing/quotas/spike-protection/#minimum-event-calculation
> This calculation, which is the first step of our algorithm, identifies a minimum number of events, using your quota as a guide. This number takes the maximum of either 500 events or the result of the following formula (3 \* your quota)/(720 \* number of projects). **The number of projects is capped at 5** and is used to adjust the floor.
**The number of projects is capped at 5** - In my Sentry contract, I have around 100 projects. But, the formula is using `5` as number of projects. That means the Spike Protection has that high threshold, that I cannot rely on it at all. It will kicks in when most of my quota is already burnt. [yes, real scenario that happened to me]
### Solution Brainstorm
The formula should not cape number of projects to 5 - it should either be flexible or configurable.
Ideally, I can configure threshold for Spike Protection same way as I can do it for rate limiting.
(of course, OK to keep existing behaviour as default and allow for opt-in to adjust it per project/account)
### Product Area
Settings - Spike Protection
┆Issue is synchronized with this [Jira Improvement](https://getsentry.atlassian.net/browse/FEEDBACK-2275) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.