Programatically start recording.
It doesn't seem possible to start a new recording session using the react native package as one can using the javascript package, i.e:
// You can access the active replay instance from anywhere in your code like this:
const replay = Sentry.getReplay();
// This starts in `session` mode, regardless of sample rates
replay.start();
I would like to start recording sessions based on the value of a feature flag, so I don't just want a sample rate as set in the Sentry.init call:
_experiments: {
replaysSessionSampleRate: 1,
replaysOnErrorSampleRate: 1,
},
Am I missing something or is this something that could be supported in the future?
Hi @DeanGracey, thank you for using/trying our Mobile Session Replay.
Programmatic control (same as in JS replay.start()) of mobile replays is on our backlog and is definitely coming.
Let us know if you have any more question about Mobile Replay.
https://sentry.zendesk.com/agent/tickets/143686
👍 This is also a must-have feature for my use case. I don't want to negatively impact all users by enabling this, and I want to record all user sessions only when they start a specific user flow.
Same here. We would highly appreciate this feature 👍
We have users with bad performing devices. Letting the session run all the time, might drop them out of the "smooth" performance.
So we want to let the users
- trigger the session on their own and record buggy behavior
- just opt-in for all the time running session (when their device is performant enough)
Off Topic: Just a "Thank You!" for this great project! You saved us a lot of time investigating and staying sane in hard times 👍 (a quick look in transactions tells us - all things are running smooth on the client side - and we are not dependent on (never happening) positive feedback of users 😅 )
Thanks for the feedback, we will keep you up-to-date once we have news on this!
Adding in a specific use-case that came up recently:
- Defer the initialization of the Sentry SDK, so they can enable Session Replay only for a specific user that is identified via feature flag; for troubleshooting purposes
We would really appreciate having this feature as well. It would greatly help us debug issues for specific clients and provide significant support in identifying sensitive situations. Having this capability would make a big difference for us. Thank you in advance for considering it!
https://sentry.zendesk.com/agent/tickets/161534