Skip to content
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: Add options to redact or ignore view for Replay #4228

Merged
merged 7 commits into from
Aug 6, 2024

Conversation

brustolin
Copy link
Contributor

📜 Description

Added options to ReplayOptions for users to specify which classes to redact or ignore during replay.
Also added functions to SentrySDK and a UIView extension to choose specific views to redact or ignore.

💚 How did you test it?

Unit tests

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • 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.
  • 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.

Copy link

github-actions bot commented Aug 2, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 9a05d2b

Copy link

github-actions bot commented Aug 2, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1223.25 ms 1229.96 ms 6.71 ms
Size 21.58 KiB 697.69 KiB 676.10 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
2af280d 1232.31 ms 1249.98 ms 17.67 ms
2df93b0 1210.73 ms 1228.76 ms 18.02 ms
ff5c1d8 1244.30 ms 1263.96 ms 19.66 ms
32e64d1 1224.45 ms 1238.94 ms 14.49 ms
ea2a263 1201.84 ms 1214.78 ms 12.94 ms
6001822 1220.82 ms 1245.02 ms 24.20 ms
aad68bb 1221.12 ms 1237.41 ms 16.29 ms
be51b56 1220.84 ms 1249.36 ms 28.52 ms
2405ba5 1248.37 ms 1259.30 ms 10.93 ms
f1c36e0 1215.18 ms 1223.62 ms 8.43 ms

App size

Revision Plain With Sentry Diff
2af280d 20.76 KiB 435.22 KiB 414.46 KiB
2df93b0 21.58 KiB 682.40 KiB 660.81 KiB
ff5c1d8 20.76 KiB 430.98 KiB 410.22 KiB
32e64d1 20.76 KiB 433.18 KiB 412.42 KiB
ea2a263 21.58 KiB 418.58 KiB 396.99 KiB
6001822 22.85 KiB 410.98 KiB 388.13 KiB
aad68bb 21.58 KiB 542.38 KiB 520.80 KiB
be51b56 20.76 KiB 432.20 KiB 411.44 KiB
2405ba5 20.76 KiB 435.23 KiB 414.47 KiB
f1c36e0 21.58 KiB 670.40 KiB 648.81 KiB

Previous results on branch: feat/custom-redact

Startup times

Revision Plain With Sentry Diff
8080f83 1234.22 ms 1253.59 ms 19.37 ms
e35cf54 1224.96 ms 1236.94 ms 11.98 ms
f29c46f 1241.43 ms 1243.91 ms 2.49 ms

App size

Revision Plain With Sentry Diff
8080f83 21.58 KiB 697.44 KiB 675.86 KiB
e35cf54 21.58 KiB 697.68 KiB 676.10 KiB
f29c46f 21.58 KiB 697.45 KiB 675.87 KiB

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 99.00990% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.485%. Comparing base (61249fb) to head (9a05d2b).
Report is 8 commits behind head on main.

Files Patch % Lines
Sources/Sentry/SentrySDK.m 50.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4228       +/-   ##
=============================================
+ Coverage   91.350%   91.485%   +0.134%     
=============================================
  Files          610       612        +2     
  Lines        48963     49340      +377     
  Branches     17596     17837      +241     
=============================================
+ Hits         44728     45139      +411     
+ Misses        4142      4109       -33     
+ Partials        93        92        -1     
Files Coverage Δ
Sources/Sentry/SentrySessionReplayIntegration.m 85.253% <100.000%> (+1.162%) ⬆️
Sources/Swift/Extensions/UIViewExtensions.swift 100.000% <100.000%> (ø)
...tegrations/SessionReplay/SentryReplayOptions.swift 93.103% <100.000%> (+0.510%) ⬆️
Sources/Swift/Tools/SentryViewPhotographer.swift 90.000% <100.000%> (+1.111%) ⬆️
Sources/Swift/Tools/UIRedactBuilder.swift 99.056% <100.000%> (+0.261%) ⬆️
...onReplay/SentrySessionReplayIntegrationTests.swift 98.543% <100.000%> (+0.717%) ⬆️
Tests/SentryTests/UIRedactBuilderTests.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentrySDK.m 88.826% <50.000%> (-0.769%) ⬇️

... and 49 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 61249fb...9a05d2b. Read the comment docs.

Copy link
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.

LGTM, with a couple of comments. Nothing blocking.

Copy link
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.

Again, LGTM.

@brustolin brustolin merged commit 8f22c40 into main Aug 6, 2024
61 of 67 checks passed
@brustolin brustolin deleted the feat/custom-redact branch August 6, 2024 13:43
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.

2 participants