Issue
I have set a sampling rate of ie. 0.1 (10%), but the ratio of accepted to dropped events in my Sentry stats doesn't seem to match it well.
Applies To
- All SaaS Customers and Self-Hosted Users
- Filtering and Sampling
- All SDKs
Symptoms
A sampling rate can refer to several types of events, ie. sampleRate for errors, tracesSampleRate for transactions, profilesSampleRate for profiles, and replaysSessionSampleRate and replaysOnErrorSampleRate for replays.
Resolution
This sampling rate does not apply to your overall sum of events. Meaning that ie. with a sampling rate of 0.1, in 10 events, we won't necessarily send only 1. Instead, this rate is applied to every event individually, meaning that every single one has a 10% chance of being sampled. This could explain the stats that you are seeing. If you are consuming too many events, you can always lower your sampling rate and see if that helps.
There are other things to take into consideration, such as decision precedence (which is especially important when dealing with distributed tracing), cached or older versions of your app that had a different sampling rate still being accessed, etc. If you still think that your sampling rates are not being applied as you'd expect, please contact support here.