getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.17k stars 4.2k forks source link

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

Open keradus opened 2 months ago

keradus commented 2 months ago

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 by Unito

getsantry[bot] commented 2 months ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 2 months ago

Routing to @getsentry/product-owners-settings-spike-protection for triage ⏲️

brianthi commented 2 months ago

Hi @keradus, thanks for raising this. Agree that we need to be more flexible with the calculation of the baseline. We don't have plans to change the way that the thresholds are calculated in the short term, but will keep this open and reach back out to you for feedback and early access when we do.

getsantry[bot] commented 2 months ago

Routing to @getsentry/product-owners-settings-spike-protection for triage ⏲️