Repository navigation
Description
Problem Statement
Projects with a lot of traffic tend to be a lot more expensive to integrate with Sentry because during error conditions there will be many times more errors sent. Roughly speaking, there's a linear correlation between traffic and $ cost for Sentry errors. Of course there is sampling to reduce this cost, but then you lose critical information because errors that happen at a lower rate than the sample rate could be cut out if other errors are happening at a high frequency.
One could argue that if there are errors happening at high frequency, then they should be addressed, deleted or filtered. But in my experience that's not reasonable - frontend projects with many users will frequently get into this state and by the time some thought has been put into mitigation you may have already exhausted many wasted $$ or missed a load of new errors that were sampled out.
Why can't there be a sample rate per event fingerprint? I understand that would still incur higher costs for high traffic projects (for example, you'll need to store those fingerprints somewhere) but the cost-errorrate relationship would not be linear and you'd barely lose any functionality by applying the sampling. You could even continue counting the errors correctly but not put the full error event information into the system.
Solution Brainstorm
- Switch in the UI for turning on sampling by error fingerprint. Select a sample rate.
- When switched on, server will apply fingerprint logic to the error and check against a counter in a key:value store to check whether it should be sampled out.
- (optionally) Add the timestamp to the error log without any detailed info (adding to the cost).
Activity
getsentry-release commentedon Aug 3, 2021
Routing to @getsentry/owners-ingest for triage. ⏲️
BYK commentedon Aug 3, 2021
We have features that seem like can help with your problem:
Not sure if you already saw these and your proposal is in addition to existing solutions or you were unable to find these resources (hence sharing them here).
untitaker commentedon Aug 3, 2021
Because determining the fingerprint for a particular event depends on resolving sourcemaps and debug symbols, which is the most expensive thing we do with an event on the server. We don't want people to send us large amounts of traffic, have us process it all and pay none of the cost that it incurs. All the existing sampling and filtering you can do today is cheap to execute because they're based on data that does not need to be computed by the server first. This doesn't apply to languages like Python/Ruby, but does to JS, for example.
jan-auer commentedon Aug 6, 2021
@roberttod to clarify, when you say "fingerprint" do you mean:
roberttod commentedon Aug 6, 2021
Thanks @BYK - I've seen these features but the spike protection is only useful for unexpected spikes, rather than long running high frequency errors and the filtering needs manual intervention for each error type and it'll stop reporting an error that might still need to be addressed.
6 remaining items
olksdr commentedon Jun 9, 2025
closing as won't do.