sentry-javascript
sentry-javascript copied to clipboard
Flush saves the recorded session even if the sample rate is zero
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.10.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
const client = SentrySDK.getClient()
const options = client.getOptions()
options.replaysSessionSampleRate = 0
options.replaysOnErrorSampleRate = 1.0
const replay = SentrySDK.replayIntegration({
minReplayDuration: 3000,
})
client.addIntegration(replay)
Steps to Reproduce
- Initialize Replay with
replaysSessionSampleRate = 0
andreplaysOnErrorSampleRate = 1.0
- Call
Sentry.getReplay().flush()
and it will upload a new video recording even if replaysSessionSampleRate is 0
Expected Result
It should not record a video when calling flush
if replaysSessionSampleRate = 0
Actual Result
It is recording a video when calling flush
when replaysSessionSampleRate = 0
.