-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MobileReplay not sampled even though replaysSessionSampleRate is set to 1 #4199
Comments
Hi @dusanristic, from the For Session Replay to work in RN, it has to be enabled in the platform SDK as well. Please add the replay sample rates to iOS and Android inits. |
Hey @krystofwoldrich, I do have these params on native side as well (apologise for not adding them in the first place). Below is the snippet code for iOS in
|
@dusanristic No worries, thank you for sharing the iOS init. For Session replay to work, you need to add the following to your iOS init. options.experimental.sessionReplay.onErrorSampleRate = 1.0
options.experimental.sessionReplay.sessionSampleRate = 1.0 Let us know if this fixed the issue. |
Thanks for your help and fast response! I have one more question though. When I add the mentioned lines to iOS init, I get the following error: Is there anything else I need to do to enable experimental features on iOS? |
I've checked the Sentry SDK, and the |
Hi @dusanristic, The code example above should work when Sentry is imported as |
What React Native libraries do you use?
Hermes, React Navigation
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
5.34.0
How does your development environment look like?
OS: Sonoma 14.1.1
Node: 18.7.1
yarn: 1.22.22
react-native: 0.72.7
hermesEnabled: true
newArchEnabled: false
Sentry.init()
Steps to Reproduce
/
Expected Result
Because the
replaysSessionSampleRate
parameter is set to 1, I expect that every session is recorded and sent to Sentry. Additionally, when I dispatch an error, that replay is not logged to Sentry either.My Replay dashboard is empty.
Actual Result
Nothing is logged to Sentry, and my Replay session dashboard is empty. When I run the app, this is my output:
I am getting that MobileReplay is not sampled even though
replaysSessionSampleRate
is set to 1.The text was updated successfully, but these errors were encountered: