-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Session replay masking preview for SwiftUI #4737
feat: Session replay masking preview for SwiftUI #4737
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
20a7c5f | 1221.20 ms | 1237.02 ms | 15.82 ms |
5e89626 | 1220.49 ms | 1238.45 ms | 17.96 ms |
925fcf3 | 1223.77 ms | 1242.21 ms | 18.44 ms |
8ffcc7c | 1229.25 ms | 1247.12 ms | 17.87 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
20a7c5f | 22.31 KiB | 778.61 KiB | 756.30 KiB |
5e89626 | 22.31 KiB | 778.40 KiB | 756.09 KiB |
925fcf3 | 22.31 KiB | 778.56 KiB | 756.25 KiB |
8ffcc7c | 22.31 KiB | 778.40 KiB | 756.09 KiB |
Previous results on branch: feat/sr-masking-preview
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1c17d33 | 1231.41 ms | 1249.06 ms | 17.65 ms |
6afd6ed | 1230.51 ms | 1251.27 ms | 20.76 ms |
762bffc | 1224.00 ms | 1247.29 ms | 23.29 ms |
2006d0e | 1210.84 ms | 1233.22 ms | 22.39 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1c17d33 | 22.31 KiB | 775.80 KiB | 753.48 KiB |
6afd6ed | 22.31 KiB | 775.64 KiB | 753.32 KiB |
762bffc | 22.31 KiB | 775.80 KiB | 753.48 KiB |
2006d0e | 22.31 KiB | 778.51 KiB | 756.19 KiB |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/uikit-masking-preview #4737 +/- ##
================================================================
- Coverage 91.190% 91.091% -0.100%
================================================================
Files 624 624
Lines 72605 72605
Branches 26450 25827 -623
================================================================
- Hits 66209 66137 -72
- Misses 6298 6374 +76
+ Partials 98 94 -4
... and 22 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see potential, that we can use the solution for debugging any iOS app. If I'm not mistaken we don't need to limit this for SwiftUI Previews. Or am I missing something, @brustolin?
Sources/SentrySwiftUI/Preview/SentryReplayMaskPreviewUIView.swift
Outdated
Show resolved
Hide resolved
Sources/SentrySwiftUI/Preview/SentryReplayMaskPreviewUIView.swift
Outdated
Show resolved
Hide resolved
Sources/SentrySwiftUI/Preview/SentryReplayMaskPreviewUIView.swift
Outdated
Show resolved
Hide resolved
Yes, technically we could also use it while running in debug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefix the ViewPhotographer class with something like InternalUseOnly_
and keep the SentryReplayMaskPreviewUIView
internal. With that approach, we could still move SentryReplayMaskPreviewUIView
to the core package and add use it for UIKit later on. Furthermore, we could make the ViewPhotographer
internal again, if we decided to.
This reverts commit d174cc2.
This reverts commit 3d87e52.
…y/sentry-cocoa into feat/sr-masking-preview
/** | ||
* Return an instance of SentryRedactOptions with given option | ||
*/ | ||
+ (UIView *)sessionReplayMaskingOverlay:(id<SentryRedactOptions>)options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since SentryMaskingPreviewView
is an internal Swift class from Sentry, we cant use from SentrySwiftUI. In order to solve this, we just use PrivateSentrySDKOnly to return it as a UIView.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this also awailable for UIKit with #4761. LGTM.
📜 Description
Allows the user to preview how its app session replay will be masked during development.
💡 Motivation and Context
closes #4633
💚 How did you test it?
Sample
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps