Skip to content

Commit 2f5e5f7

Browse files
authored
Rename session replay redact options and APIs to mask (#4373)
Renaming SR redact to mask and ignoretounmask
1 parent 4314fa2 commit 2f5e5f7

File tree

17 files changed

+74
-74
lines changed

17 files changed

+74
-74
lines changed

.github/workflows/benchmarking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
name: raw-build-output-build-xcframework
135135
path: |
136136
build-xcframework.log
137-
137+
138138
- name: Build test app with sentry
139139
run: bundle exec fastlane build_perf_test_app_sentry
140140
env:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
- Speed up HTTP tracking for multiple requests in parallel (#4366)
1515
- Slightly speed up SentryInAppLogic (#4370)
16+
- Rename session replay `redact` options and APIs to `mask` (#4373)
1617
- Stop canceling timer for manual transactions (#4380)
1718

1819
### Fixes

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ - (BOOL)application:(UIApplication *)application
2929
options.failedRequestStatusCodes = @[ httpStatusCodeRange ];
3030

3131
options.experimental.sessionReplay.quality = SentryReplayQualityMedium;
32-
options.experimental.sessionReplay.redactAllText = true;
33-
options.experimental.sessionReplay.redactAllImages = true;
32+
options.experimental.sessionReplay.maskAllText = true;
33+
options.experimental.sessionReplay.maskAllImages = true;
3434
options.experimental.sessionReplay.sessionSampleRate = 0;
3535
options.experimental.sessionReplay.onErrorSampleRate = 1;
3636

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4444
options.debug = true
4545

4646
if #available(iOS 16.0, *), !args.contains("--disable-session-replay") {
47-
options.experimental.sessionReplay = SentryReplayOptions(sessionSampleRate: 1, onErrorSampleRate: 1, redactAllText: true, redactAllImages: true)
47+
options.experimental.sessionReplay = SentryReplayOptions(sessionSampleRate: 1, onErrorSampleRate: 1, maskAllText: true, maskAllImages: true)
4848
options.experimental.sessionReplay.quality = .high
4949
}
5050

Samples/iOS-Swift/iOS-Swift/ViewControllers/SRRedactSampleViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class SRRedactSampleViewController: UIViewController {
1212
notRedactedView.backgroundColor = .green
1313
notRedactedView.transform = CGAffineTransform(rotationAngle: 45 * .pi / 180.0)
1414

15-
SentrySDK.replay.ignoreView(notRedactedView)
15+
SentrySDK.replay.maskView(notRedactedView)
1616
}
1717
}

Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ struct ContentView: View {
199199
Text("Form Screen")
200200
}
201201
}
202-
.sentryReplayRedact()
202+
.sentryReplayMask()
203203
}
204204
SecondView()
205205
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ struct SwiftUIApp: App {
1111
options.tracesSampleRate = 1.0
1212
options.profilesSampleRate = 1.0
1313
options.experimental.sessionReplay.sessionSampleRate = 1.0
14-
options.experimental.sessionReplay.redactAllImages = false
15-
options.experimental.sessionReplay.redactAllText = false
14+
options.experimental.sessionReplay.maskAllImages = false
15+
options.experimental.sessionReplay.maskAllText = false
1616
options.initialScope = { scope in
1717
scope.injectGitInformation()
1818
return scope

Sources/Sentry/Public/SentryReplayApi.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@ NS_ASSUME_NONNULL_BEGIN
1515
@interface SentryReplayApi : NSObject
1616

1717
/**
18-
* Marks this view to be redacted during replays.
18+
* Marks this view to be masked during replays.
1919
*
2020
* @warning This is an experimental feature and may still have bugs.
2121
*/
22-
- (void)redactView:(UIView *)view NS_SWIFT_NAME(redactView(_:));
22+
- (void)maskView:(UIView *)view NS_SWIFT_NAME(maskView(_:));
2323

2424
/**
25-
* Marks this view to be ignored during redact step of session replay.
26-
* All its content will be visible in the replay.
25+
* Marks this view to not be masked during redact step of session replay.
2726
*
2827
* @warning This is an experimental feature and may still have bugs.
2928
*/
30-
- (void)ignoreView:(UIView *)view NS_SWIFT_NAME(ignoreView(_:));
29+
- (void)unmaskView:(UIView *)view NS_SWIFT_NAME(unmaskView(_:));
3130

3231
/**
3332
* Pauses the replay.

Sources/Sentry/SentryReplayApi.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
@implementation SentryReplayApi
1212

13-
- (void)redactView:(UIView *)view
13+
- (void)maskView:(UIView *)view
1414
{
15-
[SentryRedactViewHelper redactView:view];
15+
[SentryRedactViewHelper maskView:view];
1616
}
1717

18-
- (void)ignoreView:(UIView *)view
18+
- (void)unmaskView:(UIView *)view
1919
{
20-
[SentryRedactViewHelper ignoreView:view];
20+
[SentryRedactViewHelper unmaskView:view];
2121
}
2222

2323
- (void)pause

Sources/SentrySwiftUI/SentryReplayView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct SentryReplayView: UIViewRepresentable {
1010

1111
func makeUIView(context: Context) -> UIView {
1212
let result = SentryRedactView()
13-
result.sentryReplayRedact()
13+
result.sentryReplayMask()
1414
return result
1515
}
1616

@@ -29,15 +29,15 @@ struct SentryReplayModifier: ViewModifier {
2929
@available(iOS 13, macOS 10.15, tvOS 13, *)
3030
public extension View {
3131

32-
/// Marks the view as containing sensitive information that should be redacted during replays.
32+
/// Marks the view as containing sensitive information that should be masked during replays.
3333
///
34-
/// When this modifier is applied, any sensitive content within the view will be hidden or masked
34+
/// When this modifier is applied, any sensitive content within the view will be masked
3535
/// during session replays to ensure user privacy. This is useful for views containing personal
3636
/// data or confidential information that shouldn't be visible when the replay is reviewed.
3737
///
3838
/// - Returns: A modifier that redacts sensitive information during session replays.
3939
/// - Experiment: This is an experimental feature and may still have bugs.
40-
func sentryReplayRedact() -> some View {
40+
func sentryReplayMask() -> some View {
4141
modifier(SentryReplayModifier())
4242
}
4343
}

0 commit comments

Comments
 (0)