getsentry / getsentry/sentry

Spike Protection: Minimum Event Calculation capes project count to 5, even when having 100 projects in contract - flexibility needed

Open
#76,855 4 comments 8 reactions 0 assignees View on GitHub
Feature Product Area: Settings - Spike Protection Sync: Jira
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.