#iOS: on-demand session replay start

2 messages · Page 1 of 1 (latest)

vast forge
#

I am trying to use session replay in iOS app with sample rate driven by remote feature flag storage. The problem is that SentrySDK is the first service initialized in the app and feature flag values are not yet available at that point.
Is there a way to start session replay later in the app while being able to configure sample rates? I see SentryReplayApi object exposed, but it's public api and documentation are a bit limited.

open badge
#

If you want to change the sample rate for SessionReplay you need to close the SDK and start it again.
You can use SentryReplayApi.stop and SentryReplayApi.start to start and stop replays any time.