Description
Description
I created a sample in #5055 which provides a function to reload the Sentry SDK:
static func reloadSentrySDK() {
if SentrySDK.isEnabled {
print("SentrySDK already started, closing it")
SentrySDK.close()
}
SentrySDK.start { options in
options.dsn = "https://[email protected]/5428557"
options.debug = true
options.tracesSampleRate = 1.0
options.profilesSampleRate = 1.0
options.sessionReplay.sessionSampleRate = Self.isSessionReplayEnabled ? 1.0 : 0.0
options.sessionReplay.enableExperimentalViewRenderer = Self.isExperimentalViewRendererEnabled
}
}
When closing the SDK the on-demand replay capturing is not restarted.
An initial investigation showed that uninstalling the SentrySessionReplayIntegration
calls the method SentrySessionReplay.pause()
which invalidates the CADisplayLink
used as the trigger for creating frames:
When installing the SDK again, there seems to be left-over state and the session replay recorder is not bootstrapped correctly.
When calling stop()
instead of pause()
in the SentrySessionReplayIntegration
, the object gets deallocated and discarded, but it is not started again correctly.
Metadata
Metadata
Assignees
Type
Projects
Status
Done