I am receiving session replays for all errors, even when beforeErrorSampling returns false. I'm using @sentry/vue version 8.47.0. It seems that the beforeErrorSampling callback is never called. The integration is included in replayIntegration, and replaysOnErrorSampleRate is set to 1.0.
Perhaps I’m misunderstanding something. The documentation is not very detailed: https://docs.sentry.io/platforms/javascript/session-replay/understanding-sessions/#ignore-certain-errors-for-error-sampling
For example, I’m unsure whether replaysOnErrorSampleRate correlates with beforeErrorSampling or if beforeErrorSampling completely overrides it. Regardless, it seems that beforeErrorSampling is never called. What am I missing?
I want to filter out replays for specific errors, such as:
Error: Failed to fetch https://api.mapbox.com/v4/mapb....
If the error message includes "Failed to fetch https://api.mapbox.com/", I return false in beforeErrorSampling(). However, this does not work. Why?