Conversation
|
hi @iangmaia 👋 are you fine with reviewing this PR? 🙂 |
| event | ||
| } | ||
| sampleRate = when (val errorsSampleRate = dataProvider.errorSampling) { | ||
| ErrorSampling.Disabled -> null |
There was a problem hiding this comment.
The null here confused me a bit, but looking at the code it's clear that this is a sort of mapping between the exposed ErrorSampling and this internal options from Sentry, I guess?
No change required, I just want to confirm my understanding 🙂 (but maybe worth a comment if it's not that obvious)
There was a problem hiding this comment.
The null here confused me a bit, but looking at the code it's clear that this is a sort of mapping between the exposed ErrorSampling and this internal options from Sentry, I guess?
Yes, exactly! Looking at source code of Sentry, options.sampleRate is null by default and null means "we don't sample errors".
Alternatively, null is the same as we would set sampleRate = 1.0 (meaning: all errors are sent), but null is a default expected by framework to disable this feature, so that's why I decided to map like this.
Description
This PR introduces a new property to configure for consumers:
errorSamplingwhich allows them to reduce the number of issues they report.Testing
It's not necessarily - the property is passed (unit tests) and we don't aim to test Sentry framework here - we trust it simply works.