Skip to content

feat: Add showMaskPreview to SentrySDK.replay api to debug replay masking#4761

Merged
brustolin merged 34 commits intomainfrom
feat/uikit-masking-preview
Jan 31, 2025
Merged

feat: Add showMaskPreview to SentrySDK.replay api to debug replay masking#4761
brustolin merged 34 commits intomainfrom
feat/uikit-masking-preview

Conversation

@brustolin
Copy link
Copy Markdown
Contributor

@brustolin brustolin commented Jan 28, 2025

📜 Description

Add showMaskPreview to SentrySDK.replay api to debug replay masking

💚 How did you test it?

Samples

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • [] I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 28, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Add `showMaskPreview` to `SentrySDK.replay` api to debug replay masking ([#4761](https://github.com/getsentry/sentry-cocoa/pull/4761))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against d2254ad

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 76.15385% with 31 lines in your changes missing coverage. Please review.

Project coverage is 91.196%. Comparing base (7db7c42) to head (d2254ad).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryReplayApi.m 0.000% 15 Missing ⚠️
...ssionReplay/Preview/SentryMaskingPreviewView.swift 85.106% 7 Missing ⚠️
Sources/Sentry/SentrySessionReplayIntegration.m 70.000% 6 Missing ⚠️
Sources/Sentry/PrivateSentrySDKOnly.mm 0.000% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4761       +/-   ##
=============================================
+ Coverage   91.130%   91.196%   +0.066%     
=============================================
  Files          625       626        +1     
  Lines        72651     72776      +125     
  Branches     25825     26495      +670     
=============================================
+ Hits         66207     66369      +162     
+ Misses        6349      6309       -40     
- Partials        95        98        +3     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySDK.m 87.613% <100.000%> (ø)
Sources/Swift/Protocol/SentryRedactOptions.swift 100.000% <ø> (ø)
Sources/Swift/Tools/UIImageHelper.swift 90.909% <100.000%> (-0.396%) ⬇️
...onReplay/SentrySessionReplayIntegrationTests.swift 98.909% <100.000%> (+0.062%) ⬆️
Tests/SentryTests/SentrySDKTests.swift 96.778% <100.000%> (+0.032%) ⬆️
Sources/Sentry/PrivateSentrySDKOnly.mm 23.902% <0.000%> (-0.355%) ⬇️
Sources/Sentry/SentrySessionReplayIntegration.m 88.652% <70.000%> (-0.926%) ⬇️
...ssionReplay/Preview/SentryMaskingPreviewView.swift 85.106% <85.106%> (ø)
Sources/Sentry/SentryReplayApi.m 54.237% <0.000%> (-18.490%) ⬇️

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7db7c42...d2254ad. Read the comment docs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 28, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1247.31 ms 1264.40 ms 17.09 ms
Size 22.31 KiB 778.76 KiB 756.45 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e8c8a05 1218.71 ms 1234.50 ms 15.79 ms
4977fbc 1217.26 ms 1239.82 ms 22.56 ms
f8833c4 1229.69 ms 1236.45 ms 6.76 ms
a34f08c 1234.08 ms 1246.40 ms 12.31 ms
7cd187e 1223.41 ms 1249.40 ms 26.00 ms
1bbcb9c 1192.51 ms 1231.96 ms 39.45 ms
ef5821b 1253.18 ms 1265.46 ms 12.28 ms
881a955 1209.47 ms 1225.94 ms 16.47 ms
ec879f7 1218.12 ms 1236.08 ms 17.96 ms
e1eed6b 1259.08 ms 1270.57 ms 11.49 ms

App size

Revision Plain With Sentry Diff
e8c8a05 21.58 KiB 683.51 KiB 661.92 KiB
4977fbc 20.76 KiB 419.85 KiB 399.10 KiB
f8833c4 21.58 KiB 422.66 KiB 401.08 KiB
a34f08c 22.30 KiB 730.30 KiB 708.00 KiB
7cd187e 20.76 KiB 401.66 KiB 380.89 KiB
1bbcb9c 20.76 KiB 426.10 KiB 405.34 KiB
ef5821b 21.58 KiB 414.96 KiB 393.37 KiB
881a955 22.85 KiB 407.63 KiB 384.78 KiB
ec879f7 21.58 KiB 669.68 KiB 648.10 KiB
e1eed6b 20.76 KiB 432.17 KiB 411.41 KiB

Previous results on branch: feat/uikit-masking-preview

Startup times

Revision Plain With Sentry Diff
925fcf3 1223.77 ms 1242.21 ms 18.44 ms
20a7c5f 1221.20 ms 1237.02 ms 15.82 ms
d8a4fc7 1219.10 ms 1247.29 ms 28.18 ms
5e89626 1220.49 ms 1238.45 ms 17.96 ms
bcd7623 1200.45 ms 1227.76 ms 27.31 ms
050ad94 1222.04 ms 1240.71 ms 18.67 ms
8ffcc7c 1229.25 ms 1247.12 ms 17.87 ms
bb9f0e0 1211.08 ms 1229.24 ms 18.16 ms

App size

Revision Plain With Sentry Diff
925fcf3 22.31 KiB 778.56 KiB 756.25 KiB
20a7c5f 22.31 KiB 778.61 KiB 756.30 KiB
d8a4fc7 22.31 KiB 778.51 KiB 756.19 KiB
5e89626 22.31 KiB 778.40 KiB 756.09 KiB
bcd7623 22.31 KiB 778.54 KiB 756.23 KiB
050ad94 22.31 KiB 778.75 KiB 756.44 KiB
8ffcc7c 22.31 KiB 778.40 KiB 756.09 KiB
bb9f0e0 22.31 KiB 778.60 KiB 756.29 KiB

@brustolin brustolin marked this pull request as ready for review January 29, 2025 13:53
@brustolin brustolin requested a review from philprime as a code owner January 29, 2025 13:53
Copy link
Copy Markdown
Member

@armcknight armcknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good generally! Just small stuff I'd propose changing before merging.

Copy link
Copy Markdown
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a few potential issues, but the feature looks promising.

brustolin and others added 2 commits January 30, 2025 16:20
* Revert "ref"

This reverts commit d174cc2.

* Refactory

* Format code

* Revert "revert"

This reverts commit 3d87e52.

* Update PrivateSentrySDKOnly.h

* SENTRY_HAS_UIKIT

* Format code

* Update SentryInternal.h

* Update CHANGELOG.md

* SENTRY_TARGET_REPLAY_SUPPORTED

* Update SentrySessionReplayIntegration.m

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
@brustolin brustolin enabled auto-merge (squash) January 30, 2025 15:44
@brustolin brustolin merged commit 70c49ca into main Jan 31, 2025
@brustolin brustolin deleted the feat/uikit-masking-preview branch January 31, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants