Closed irudoy closed 6 years ago
Sounds reasonable. There are scenarios where you'd want to send an error to the dashboard, despite having 20% sample rate. It's also pretty straightforward to implement.
Raven.captureMessage('Wubba Lubba Dub Dub', {
skipSampleRate: true
});
Raven.captureError(new Error('Bird Person'), {
skipSampleRate: true
});
Thoughts @benvinegar?
See, my concern here is that people will call these methods in such a way that they'll blow their quota and be mad the sample rate didn't help them, even if they disabled it using this option. I'm not convinced you should be able to disable it.
Let's keep this issue open for a while to see if other users find this problematic before rushing to a solution.
On the other side, I can definitely see a scenario, where global handlers should be set to let's say 20% sample rate, as one may have a pretty crowded site, but they'd want to make sure that captureException
from on their payment component will always reach our servers. Right now there's no way to achieve that.
Right now there's no way to achieve that.
I mean, there is (you could implement your own rate limiting in shouldSendCallback
), but it's tricky.
FWIW, I can think of a ton of potential scenarios Raven.js doesn't handle well. We wait until there's enough momentum/feedback before implementing them, or Raven.js will not remain manageable nor be capable of staying under 10kb.
my 2c is doing this in shouldSendCallback is a pretty clean solution for now
Does this feature come true? I can't find the relevant code for skipSampleRate option in @sentry/javascript.
Nope it didn't, there is no skipSampleRate
.
If you want to do a complex filtering logic you need to use beforeSend
and return null in case you do not want to send the event. Then you can do your own sample logic.
I need this, how can I achieve that now? or is there any workaround using startTransaction/withScope ?
There is no alternative solution to what Daniel already mentioned above:
If you want to do a complex filtering logic you need to use beforeSend and return null in case you do not want to send the event. Then you can do your own sample logic.
When I use methods
captureException
andcaptureMessage
, I don't have the ability to ignore thesampleRate
option. Is it possible to implement this?