Skip to content

refactor(session-replay): Add separate files and missing type prefix #5343

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

philprime
Copy link
Contributor

@philprime philprime commented Jun 3, 2025

  • Refactors types into separate files
  • Adds missing prefix Sentry for crash detection.
  • Renamed image to maskedViewImage in multiple occurences to indicate what kind of image it is.

Blocked by:

These changes are derived from #5073

#skip-changelog

@philprime philprime self-assigned this Jun 3, 2025
Copy link
Contributor

github-actions bot commented Jun 3, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1225.50 ms 1246.44 ms 20.94 ms
Size 23.76 KiB 837.92 KiB 814.16 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
83d84d7 1244.92 ms 1253.34 ms 8.42 ms
ed68562 1229.16 ms 1248.74 ms 19.58 ms
5c6ef23 1237.33 ms 1252.58 ms 15.25 ms
15cfa41 1235.04 ms 1255.78 ms 20.73 ms
d011484 1220.86 ms 1237.18 ms 16.33 ms
cbf6225 1221.73 ms 1251.20 ms 29.47 ms
2af280d 1246.22 ms 1253.10 ms 6.88 ms
f0283e8 1253.36 ms 1263.12 ms 9.76 ms
f79ec31 1235.18 ms 1255.38 ms 20.20 ms
ab0012c 1209.06 ms 1228.78 ms 19.72 ms

App size

Revision Plain With Sentry Diff
83d84d7 22.84 KiB 402.56 KiB 379.72 KiB
ed68562 22.84 KiB 403.24 KiB 380.39 KiB
5c6ef23 21.90 KiB 708.96 KiB 687.05 KiB
15cfa41 22.32 KiB 761.42 KiB 739.10 KiB
d011484 21.58 KiB 616.14 KiB 594.56 KiB
cbf6225 20.76 KiB 425.77 KiB 405.00 KiB
2af280d 20.76 KiB 435.22 KiB 414.46 KiB
f0283e8 20.76 KiB 393.36 KiB 372.60 KiB
f79ec31 21.58 KiB 544.72 KiB 523.14 KiB
ab0012c 22.85 KiB 415.09 KiB 392.24 KiB

transform: newTransform,
type: swiftUI ? .redactSwiftUI : .redact,
color: self.color(for: view),
name: layer.debugDescription
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This name is an addition, it helps to debug redaction issues.

size: layer.bounds.size,
transform: newTransform,
type: .clipOut,
name: layer.debugDescription
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See other comment

size: layer.bounds.size,
transform: newTransform,
type: .clipEnd,
name: layer.debugDescription
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See other comment

size: layer.bounds.size,
transform: newTransform,
type: .clipBegin,
name: layer.debugDescription
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See other comment

@philprime philprime marked this pull request as ready for review June 3, 2025 14:17
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 87 lines in your changes missing coverage. Please review.

Project coverage is 8.309%. Comparing base (65a4799) to head (3a1aa65).

Files with missing lines Patch % Lines
...Core/Tools/ViewCapture/SentryUIRedactBuilder.swift 0.000% 37 Missing ⚠️
...ore/Tools/ViewCapture/SentryRedactViewHelper.swift 0.000% 17 Missing ⚠️
...ft/Core/Tools/ViewCapture/SentryRedactRegion.swift 0.000% 8 Missing ⚠️
...egrations/SessionReplay/SentryOnDemandReplay.swift 0.000% 8 Missing ⚠️
...ore/Tools/ViewCapture/SentryViewPhotographer.swift 0.000% 7 Missing ⚠️
...tegrations/SessionReplay/SentrySessionReplay.swift 0.000% 3 Missing ⚠️
.../Tools/ViewCapture/SentryDefaultMaskRenderer.swift 0.000% 2 Missing ⚠️
...ssionReplay/Preview/SentryMaskingPreviewView.swift 0.000% 2 Missing ⚠️
...rations/SessionReplay/SentryReplayVideoMaker.swift 0.000% 2 Missing ⚠️
.../Core/Tools/ViewCapture/SentryMaskRendererV2.swift 0.000% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (65a4799) and HEAD (3a1aa65). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (65a4799) HEAD (3a1aa65)
3 1
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main    #5343        +/-   ##
=============================================
- Coverage   86.011%   8.309%   -77.703%     
=============================================
  Files          394      364        -30     
  Lines        34185    26452      -7733     
  Branches     14772       57     -14715     
=============================================
- Hits         29403     2198     -27205     
- Misses        4738    24254     +19516     
+ Partials        44        0        -44     
Files with missing lines Coverage Δ
.../Core/Tools/ViewCapture/SentryMaskRendererV2.swift 0.000% <0.000%> (-100.000%) ⬇️
.../Tools/ViewCapture/SentryDefaultMaskRenderer.swift 0.000% <0.000%> (-100.000%) ⬇️
...ssionReplay/Preview/SentryMaskingPreviewView.swift 0.000% <0.000%> (-86.275%) ⬇️
...rations/SessionReplay/SentryReplayVideoMaker.swift 0.000% <0.000%> (-100.000%) ⬇️
...tegrations/SessionReplay/SentrySessionReplay.swift 0.000% <0.000%> (-90.554%) ⬇️
...ore/Tools/ViewCapture/SentryViewPhotographer.swift 0.000% <0.000%> (-73.334%) ⬇️
...ft/Core/Tools/ViewCapture/SentryRedactRegion.swift 0.000% <0.000%> (ø)
...egrations/SessionReplay/SentryOnDemandReplay.swift 0.000% <0.000%> (-89.820%) ⬇️
...ore/Tools/ViewCapture/SentryRedactViewHelper.swift 0.000% <0.000%> (ø)
...Core/Tools/ViewCapture/SentryUIRedactBuilder.swift 0.000% <0.000%> (ø)

... and 380 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 65a4799...3a1aa65. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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