@@ -51,14 +51,33 @@ public struct SentrySDKWrapper {
5151#if !os(macOS) && !os(watchOS) && !os(visionOS)
5252 if #available( iOS 16 . 0 , * ) , !SentrySDKOverrides. SessionReplay. disable. boolValue {
5353 options. sessionReplay = SentryReplayOptions (
54- sessionSampleRate: SentrySDKOverrides . SessionReplay. sessionSampleRate. floatValue ?? 0 ,
54+ sessionSampleRate: SentrySDKOverrides . SessionReplay. sessionSampleRate. floatValue ?? 1 ,
5555 onErrorSampleRate: SentrySDKOverrides . SessionReplay. onErrorSampleRate. floatValue ?? 1 ,
5656 maskAllText: !SentrySDKOverrides. SessionReplay. disableMaskAllText. boolValue,
5757 maskAllImages: !SentrySDKOverrides. SessionReplay. disableMaskAllImages. boolValue,
5858 enableViewRendererV2: !SentrySDKOverrides. SessionReplay. disableViewRendererV2. boolValue,
5959 // Disable the fast view rendering, because we noticed parts (like the tab bar) are not rendered correctly
6060 enableFastViewRendering: SentrySDKOverrides . SessionReplay. enableFastViewRendering. boolValue
6161 )
62+
63+ // Configure network detail capture for testing
64+ options. sessionReplay. networkDetailAllowUrls = [
65+ " httpbin.org "
66+ ]
67+ options. sessionReplay. networkDetailDenyUrls = [
68+ try ! NSRegularExpression ( pattern: " .* \\ .sentry \\ .io.* " , options: [ ] )
69+ ]
70+
71+ options. sessionReplay. networkRequestHeaders = [
72+ " User-Agent " ,
73+ " X-Custom-Header " ,
74+ " X-Request-ID "
75+ ]
76+ options. sessionReplay. networkResponseHeaders = [
77+ " Server " ,
78+ " Access-Control-Allow-Origin " ,
79+ " access-control-allow-credentials "
80+ ]
6281 let defaultReplayQuality = options. sessionReplay. quality
6382 options. sessionReplay. quality = SentryReplayOptions . SentryReplayQuality ( rawValue: ( SentrySDKOverrides . SessionReplay. quality. stringValue as? NSString ) ? . integerValue ?? defaultReplayQuality. rawValue) ?? defaultReplayQuality
6483
0 commit comments