Skip to content

Commit 886c056

Browse files
authored
chore(session-replay): GA of better session replay view renderer V2 (getsentry#5054)
1 parent 7a98632 commit 886c056

File tree

24 files changed

+210
-91
lines changed

24 files changed

+210
-91
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Unreleased
44

5+
> ![Important]
6+
> This version enables the better view renderer V2 used by Session Replay by default.
7+
> You can disable it by setting the option `options.sessionReplay.enableViewRendererV2` to `false`.
8+
>
9+
> In case you are noticing issues with view rendering, please report them on [GitHub](https://github.com/getsentry/sentry-cocoa).
10+
511
### Features
612

713
- Added ability to bring your own button for user feedback form display (#5107)
@@ -15,6 +21,7 @@
1521
- More logging for Session Replay video info (#5132)
1622
- Improve session replay frame presentation timing calculations (#5133)
1723
- Use wider compatible video encoding options for Session Replay (#5134)
24+
- GA of better session replay view renderer V2 (#5054)
1825

1926
## 8.49.1
2027

Samples/SessionReplay-CameraTest/Sources/AppDelegate.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import UIKit
55
class AppDelegate: UIResponder, UIApplicationDelegate {
66

77
static var isSessionReplayEnabled = true
8-
static var isExperimentalViewRendererEnabled = true
8+
static var isViewRendererV2Enabled = true
99

1010
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1111
AppDelegate.reloadSentrySDK()
@@ -26,17 +26,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2626
options.tracesSampleRate = 1.0
2727
options.profilesSampleRate = 1.0
2828
options.sessionReplay.sessionSampleRate = Self.isSessionReplayEnabled ? 1.0 : 0.0
29+
options.sessionReplay.enableViewRendererV2 = Self.isViewRendererV2Enabled
30+
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
31+
options.sessionReplay.enableFastViewRendering = false
2932

3033
options.initialScope = { scope in
3134
scope.injectGitInformation()
3235
scope.setTag(value: "session-replay-camera-test", key: "sample-project")
3336
return scope
3437
}
35-
36-
// Experimental features
37-
options.sessionReplay.enableExperimentalViewRenderer = Self.isExperimentalViewRendererEnabled
38-
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
39-
options.sessionReplay.enableFastViewRendering = false
4038
}
4139
}
4240

Samples/SessionReplay-CameraTest/Sources/Base.lproj/Main.storyboard

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
33
<device id="retina6_12" orientation="portrait" appearance="light"/>
44
<dependencies>
5-
<deployment identifier="iOS"/>
65
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
76
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
87
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -55,7 +54,7 @@
5554
<action selector="didChangeToggleValue:" destination="BYZ-38-t0r" eventType="valueChanged" id="YDG-LS-tz1"/>
5655
</connections>
5756
</switch>
58-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Use Experimental View Renderer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eMi-nO-dyM">
57+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Use View Renderer V2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eMi-nO-dyM">
5958
<rect key="frame" x="57" y="0.0" width="320" height="31"/>
6059
<fontDescription key="fontDescription" type="system" pointSize="17"/>
6160
<nil key="textColor"/>
@@ -89,7 +88,7 @@
8988
<outlet property="backgroundLabel" destination="5r7-mb-ufO" id="aDg-zV-JST"/>
9089
<outlet property="controlsContainerView" destination="5YZ-1e-IzZ" id="EUS-T5-IdQ"/>
9190
<outlet property="enableSessionReplaySwitch" destination="4WQ-YN-9zT" id="WNt-tk-Hs7"/>
92-
<outlet property="useExperimentalViewRendererSwitch" destination="WOe-Ha-XHR" id="efd-0g-nYG"/>
91+
<outlet property="useViewRendererV2Switch" destination="WOe-Ha-XHR" id="efd-0g-nYG"/>
9392
</connections>
9493
</viewController>
9594
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -102,7 +101,7 @@
102101
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
103102
</systemColor>
104103
<systemColor name="systemOrangeColor">
105-
<color red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
104+
<color red="1" green="0.58431372549019611" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
106105
</systemColor>
107106
</resources>
108107
</document>

Samples/SessionReplay-CameraTest/Sources/ViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ViewController: UIViewController {
88
@IBOutlet weak var controlsContainerView: UIView!
99

1010
@IBOutlet weak var enableSessionReplaySwitch: UISwitch!
11-
@IBOutlet weak var useExperimentalViewRendererSwitch: UISwitch!
11+
@IBOutlet weak var useViewRendererV2Switch: UISwitch!
1212

1313
private weak var previewView: PreviewView!
1414
private weak var errorLabel: UILabel!
@@ -91,9 +91,9 @@ class ViewController: UIViewController {
9191
if sender === enableSessionReplaySwitch {
9292
AppDelegate.isSessionReplayEnabled = sender.isOn
9393
print("Enable session replay flag changed to: \(AppDelegate.isSessionReplayEnabled)")
94-
} else if sender === useExperimentalViewRendererSwitch {
95-
AppDelegate.isExperimentalViewRendererEnabled = sender.isOn
96-
print("Use experimental view renderer flag changed to: \(AppDelegate.isExperimentalViewRendererEnabled)")
94+
} else if sender === useViewRendererV2Switch {
95+
AppDelegate.isViewRendererV2Enabled = sender.isOn
96+
print("Use view renderer V2 flag changed to: \(AppDelegate.isViewRendererV2Enabled)")
9797
}
9898
AppDelegate.reloadSentrySDK()
9999
}

Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ - (BOOL)application:(UIApplication *)application
7575

7676
options.experimental.enableFileManagerSwizzling
7777
= ![args containsObject:@"--disable-filemanager-swizzling"];
78-
options.sessionReplay.enableExperimentalViewRenderer
78+
options.sessionReplay.enableViewRendererV2
7979
= ![args containsObject:@"--disable-experimental-view-renderer"];
8080
options.sessionReplay.enableFastViewRendering
8181
= ![args containsObject:@"--disable-fast-view-renderer"];

Samples/iOS-Swift/iOS-Swift/SentrySDKWrapper.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ struct SentrySDKWrapper {
3535
maskAllImages: true
3636
)
3737
options.sessionReplay.quality = .high
38+
options.sessionReplay.enableViewRendererV2 = true
39+
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
40+
options.sessionReplay.enableFastViewRendering = false
3841
}
3942

4043
if #available(iOS 15.0, *), !SentrySDKOverrides.Other.disableMetricKit.boolValue {
@@ -108,9 +111,6 @@ struct SentrySDKWrapper {
108111

109112
// Experimental features
110113
options.experimental.enableFileManagerSwizzling = !SentrySDKOverrides.Other.disableFileManagerSwizzling.boolValue
111-
options.sessionReplay.enableExperimentalViewRenderer = true
112-
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
113-
options.sessionReplay.enableFastViewRendering = false
114114
}
115115

116116
func configureInitialScope(scope: Scope) -> Scope {

Samples/iOS-Swift/iOS-Swift6/AppDelegate.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2929
options.sampleRate = 1
3030
options.tracesSampleRate = 1
3131

32-
// Experimental features
33-
options.experimental.enableFileManagerSwizzling = true
34-
options.sessionReplay.enableExperimentalViewRenderer = true
32+
options.sessionReplay.enableViewRendererV2 = true
3533
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
3634
options.sessionReplay.enableFastViewRendering = false
35+
36+
// Experimental features
37+
options.experimental.enableFileManagerSwizzling = true
3738
})
3839

3940
}

Samples/iOS-Swift/iOS-SwiftClip/AppDelegate.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2020
return scope
2121
}
2222

23-
// Experimental features
24-
options.experimental.enableFileManagerSwizzling = true
25-
options.sessionReplay.enableExperimentalViewRenderer = true
23+
options.sessionReplay.enableViewRendererV2 = true
2624
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
2725
options.sessionReplay.enableFastViewRendering = false
26+
27+
// Experimental features
28+
options.experimental.enableFileManagerSwizzling = true
2829
}
2930

3031
return true

Samples/iOS-Swift/iOS13-Swift/AppDelegate.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3737
return scope
3838
}
3939

40-
// Experimental features
41-
options.experimental.enableFileManagerSwizzling = true
42-
options.sessionReplay.enableExperimentalViewRenderer = true
40+
options.sessionReplay.enableViewRendererV2 = true
4341
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
4442
options.sessionReplay.enableFastViewRendering = false
43+
44+
// Experimental features
45+
options.experimental.enableFileManagerSwizzling = true
4546
}
4647
}
4748

Samples/iOS-SwiftUI/iOS-SwiftUI/SwiftUIApp.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ struct SwiftUIApp: App {
1616
return scope
1717
}
1818

19-
// Experimental features
20-
options.experimental.enableFileManagerSwizzling = true
21-
options.sessionReplay.enableExperimentalViewRenderer = true
19+
options.sessionReplay.enableViewRendererV2 = true
2220
// Disable the fast view renderering, because we noticed parts (like the tab bar) are not rendered correctly
2321
options.sessionReplay.enableFastViewRendering = false
22+
23+
// Experimental features
24+
options.experimental.enableFileManagerSwizzling = true
2425
}
2526
}
2627

0 commit comments

Comments
 (0)