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

impr: Add extra logs for UIViewControllerSwizzling #4511

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

philipphofmann
Copy link
Member

📜 Description

Add more log messages for potential troubleshooting for swizzling UIViewControllers.

💡 Motivation and Context

This will help us to investigate why on Xcode 16. the SDK only swizzles the RootViewController, but it works on Xcode 15.4 for an important customer.

💚 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.

🔮 Next steps

Add more log messages for potential troubleshooting for swizzling
UIViewControllers.
Copy link

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySubClassFinder.m
  • Sources/Sentry/SentryUIViewControllerSwizzling.m

Copy link

github-actions bot commented Nov 6, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1229.29 ms 1246.92 ms 17.63 ms
Size 21.90 KiB 726.90 KiB 704.99 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ddb4778 1274.37 ms 1284.48 ms 10.11 ms
c021422 1199.15 ms 1222.20 ms 23.05 ms
861d361 1227.90 ms 1231.45 ms 3.55 ms
c319795 1220.06 ms 1248.50 ms 28.44 ms
48e8c2e 1233.78 ms 1255.44 ms 21.66 ms
ba4d16f 1236.90 ms 1252.12 ms 15.22 ms
aa45f36 1226.39 ms 1253.22 ms 26.84 ms
0d32275 1229.62 ms 1246.51 ms 16.89 ms
407ff99 1225.49 ms 1232.88 ms 7.39 ms
d3edf46 1213.00 ms 1227.46 ms 14.46 ms

App size

Revision Plain With Sentry Diff
ddb4778 21.58 KiB 414.92 KiB 393.34 KiB
c021422 20.76 KiB 435.64 KiB 414.88 KiB
861d361 20.76 KiB 435.65 KiB 414.89 KiB
c319795 20.76 KiB 431.99 KiB 411.22 KiB
48e8c2e 21.58 KiB 418.45 KiB 396.86 KiB
ba4d16f 20.76 KiB 437.12 KiB 416.36 KiB
aa45f36 21.58 KiB 616.73 KiB 595.15 KiB
0d32275 22.84 KiB 403.13 KiB 380.29 KiB
407ff99 20.76 KiB 427.87 KiB 407.10 KiB
d3edf46 20.76 KiB 436.65 KiB 415.89 KiB

Previous results on branch: impr/extra-ui-view-controller-swizzle-logs

Startup times

Revision Plain With Sentry Diff
5b4984c 1216.74 ms 1242.13 ms 25.39 ms

App size

Revision Plain With Sentry Diff
5b4984c 21.90 KiB 727.21 KiB 705.31 KiB

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.414%. Comparing base (06d3040) to head (3232914).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Sentry/SentryUIViewControllerSwizzling.m 80.000% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4511       +/-   ##
=============================================
- Coverage   91.450%   91.414%   -0.036%     
=============================================
  Files          615       614        -1     
  Lines        68836     68700      -136     
  Branches     24713     24572      -141     
=============================================
- Hits         62951     62802      -149     
- Misses        5791      5805       +14     
+ Partials        94        93        -1     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySubClassFinder.m 94.444% <100.000%> (-0.102%) ⬇️
...grations/Performance/SwizzleClassNameExclude.swift 100.000% <100.000%> (ø)
Sources/Sentry/SentryUIViewControllerSwizzling.m 89.928% <80.000%> (-0.443%) ⬇️

... and 25 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 06d3040...3232914. Read the comment docs.

Copy link

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySubClassFinder.m
  • Sources/Sentry/SentryUIViewControllerSwizzling.m

Copy link

github-actions bot commented Nov 6, 2024

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySubClassFinder.m
  • Sources/Sentry/SentryUIViewControllerSwizzling.m

@philipphofmann philipphofmann merged commit f31a3ef into main Nov 6, 2024
61 of 64 checks passed
@philipphofmann philipphofmann deleted the impr/extra-ui-view-controller-swizzle-logs branch November 6, 2024 14:49
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