getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
817 stars 330 forks source link

fix: Session replay transformed view masking #4529

Closed brustolin closed 3 days ago

brustolin commented 2 weeks ago

:scroll: Description

Fixing some masking regression and added test to track it.

:bulb: Motivation and Context

:green_heart: How did you test it?

Unit tests

:pencil: Checklist

You have to check all boxes before merging:

:crystal_ball: Next steps

github-actions[bot] commented 2 weeks ago

Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1242.88 ms 1247.27 ms 4.40 ms
Size 22.30 KiB 749.69 KiB 727.39 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6e342acf0107a6421fa9221f9ecd93c5f3ef0b3b 1202.98 ms 1228.74 ms 25.76 ms
f74904fa87218947c77c10540d685d25a43a1dd1 1229.02 ms 1244.91 ms 15.89 ms
160a2a7b837e0977b5fd41054781c8beb933dd9b 1219.29 ms 1240.96 ms 21.67 ms
adca747bc8ee41c59f495cdb00c7d454bb9f94fe 1199.37 ms 1215.49 ms 16.12 ms
d9fff0f4835b462da5e42e54e0be597f5ecc76c2 1205.09 ms 1247.40 ms 42.31 ms
e89dc54f3fd0c7ad010d9a6c7cb02ac178f3fc33 1207.86 ms 1218.27 ms 10.41 ms
b0e218b68c5a91ce51cb4d3f4da4f43c03f2e7f3 1218.14 ms 1230.33 ms 12.19 ms
0559a8f6fde480f72deb62fcf01061ec925851f9 1212.37 ms 1232.12 ms 19.76 ms
a0cc9d6c722d576d43f89add906797b7ddcccc93 1235.22 ms 1248.37 ms 13.14 ms
24e07440d85b8d07ae4a98885d0f8f440ede339e 1239.15 ms 1252.39 ms 13.24 ms

App size

Revision Plain With Sentry Diff
6e342acf0107a6421fa9221f9ecd93c5f3ef0b3b 20.76 KiB 436.66 KiB 415.90 KiB
f74904fa87218947c77c10540d685d25a43a1dd1 21.58 KiB 418.71 KiB 397.12 KiB
160a2a7b837e0977b5fd41054781c8beb933dd9b 21.58 KiB 614.86 KiB 593.28 KiB
adca747bc8ee41c59f495cdb00c7d454bb9f94fe 20.76 KiB 401.36 KiB 380.60 KiB
d9fff0f4835b462da5e42e54e0be597f5ecc76c2 22.85 KiB 401.65 KiB 378.81 KiB
e89dc54f3fd0c7ad010d9a6c7cb02ac178f3fc33 22.85 KiB 412.60 KiB 389.75 KiB
b0e218b68c5a91ce51cb4d3f4da4f43c03f2e7f3 21.58 KiB 638.28 KiB 616.70 KiB
0559a8f6fde480f72deb62fcf01061ec925851f9 21.58 KiB 419.81 KiB 398.22 KiB
a0cc9d6c722d576d43f89add906797b7ddcccc93 21.58 KiB 706.47 KiB 684.88 KiB
24e07440d85b8d07ae4a98885d0f8f440ede339e 21.58 KiB 709.06 KiB 687.48 KiB

Previous results on branch: fix/masking

Startup times

Revision Plain With Sentry Diff
caade2ad6a7c2590fbac885b134f3ca73b642d6b 1223.21 ms 1245.27 ms 22.06 ms
65d2b7d3bbb21fdbdb1ff4b83f1cd346e9232555 1223.29 ms 1238.06 ms 14.77 ms
3aa67df6b8e4c636974696d5e322b19685674c9d 1213.92 ms 1240.45 ms 26.53 ms
2937a5449557b337d5a288ecf6692d795b384a3f 1234.49 ms 1250.29 ms 15.80 ms

App size

Revision Plain With Sentry Diff
caade2ad6a7c2590fbac885b134f3ca73b642d6b 22.30 KiB 749.69 KiB 727.38 KiB
65d2b7d3bbb21fdbdb1ff4b83f1cd346e9232555 22.30 KiB 730.75 KiB 708.45 KiB
3aa67df6b8e4c636974696d5e322b19685674c9d 22.30 KiB 730.74 KiB 708.44 KiB
2937a5449557b337d5a288ecf6692d795b384a3f 22.30 KiB 731.06 KiB 708.76 KiB
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.916%. Comparing base (c677654) to head (82a64b4). Report is 3 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529/graphs/tree.svg?width=650&height=150&src=pr&token=PTZKtOJlrs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) ```diff @@ Coverage Diff @@ ## main #4529 +/- ## ============================================= + Coverage 90.900% 90.916% +0.015% ============================================= Files 616 616 Lines 70502 70568 +66 Branches 25111 25065 -46 ============================================= + Hits 64087 64158 +71 + Misses 6322 6317 -5 Partials 93 93 ``` | [Files with missing lines](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [Sources/Swift/Tools/SentryViewPhotographer.swift](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?src=pr&el=tree&filepath=Sources%2FSwift%2FTools%2FSentryViewPhotographer.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-U291cmNlcy9Td2lmdC9Ub29scy9TZW50cnlWaWV3UGhvdG9ncmFwaGVyLnN3aWZ0) | `93.750% <100.000%> (+1.344%)` | :arrow_up: | | [Sources/Swift/Tools/UIRedactBuilder.swift](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?src=pr&el=tree&filepath=Sources%2FSwift%2FTools%2FUIRedactBuilder.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-U291cmNlcy9Td2lmdC9Ub29scy9VSVJlZGFjdEJ1aWxkZXIuc3dpZnQ=) | `93.832% <100.000%> (+0.110%)` | :arrow_up: | | [...ests/SentryTests/SentryViewPhotographerTests.swift](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?src=pr&el=tree&filepath=Tests%2FSentryTests%2FSentryViewPhotographerTests.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-VGVzdHMvU2VudHJ5VGVzdHMvU2VudHJ5Vmlld1Bob3RvZ3JhcGhlclRlc3RzLnN3aWZ0) | `99.635% <100.000%> (+0.106%)` | :arrow_up: | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry). Last update [c677654...82a64b4](https://app.codecov.io/gh/getsentry/sentry-cocoa/pull/4529?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry).