-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
fix: Edge case for swizzleClassNameExclude #4405
Conversation
Skip creating transactions for UIViewControllers ignored for swizzling via the option swizzleClassNameExclude. Due to some edge cases with nib files, the SDK doesn't swizzle the loadView method of the UIViewController subclasses, but instead, it swizzles the UIViewController.loadView method directly. Although the SDK doesn't swizzle the classes specified in swizzleClassNameExclude, it created transactions. Now, this is fixed. Fixes GH-4386
🚨 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:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4405 +/- ##
=============================================
+ Coverage 91.272% 91.288% +0.015%
=============================================
Files 607 609 +2
Lines 49395 49519 +124
Branches 17718 17824 +106
=============================================
+ Hits 45084 45205 +121
- Misses 4218 4221 +3
Partials 93 93
... and 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5616e0a | 1224.12 ms | 1249.86 ms | 25.74 ms |
94b89eb | 1236.08 ms | 1264.58 ms | 28.50 ms |
265f000 | 1232.96 ms | 1249.10 ms | 16.15 ms |
e0f077c | 1224.65 ms | 1243.52 ms | 18.87 ms |
e998fd0 | 1254.41 ms | 1272.78 ms | 18.37 ms |
78d5983 | 1229.98 ms | 1245.60 ms | 15.62 ms |
efb0147 | 1245.26 ms | 1266.94 ms | 21.68 ms |
f79ec31 | 1235.18 ms | 1255.38 ms | 20.20 ms |
bbe89d8 | 1239.18 ms | 1250.46 ms | 11.28 ms |
d6ff82c | 1219.06 ms | 1244.31 ms | 25.24 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5616e0a | 22.85 KiB | 407.44 KiB | 384.59 KiB |
94b89eb | 20.76 KiB | 399.20 KiB | 378.43 KiB |
265f000 | 21.58 KiB | 616.76 KiB | 595.18 KiB |
e0f077c | 22.85 KiB | 412.59 KiB | 389.74 KiB |
e998fd0 | 21.58 KiB | 414.59 KiB | 393.01 KiB |
78d5983 | 20.76 KiB | 427.80 KiB | 407.04 KiB |
efb0147 | 22.84 KiB | 403.52 KiB | 380.67 KiB |
f79ec31 | 21.58 KiB | 544.72 KiB | 523.14 KiB |
bbe89d8 | 20.76 KiB | 435.66 KiB | 414.90 KiB |
d6ff82c | 21.58 KiB | 616.14 KiB | 594.56 KiB |
Previous results on branch: fix/swizzle-class-name-exclude
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1ab4dc1 | 1232.12 ms | 1251.65 ms | 19.52 ms |
1c20131 | 1232.33 ms | 1255.73 ms | 23.40 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
1ab4dc1 | 21.58 KiB | 730.53 KiB | 708.95 KiB |
1c20131 | 21.58 KiB | 729.65 KiB | 708.07 KiB |
The SDK didn't exclude the RootViewController from swizzling when ignored by the option swizzleClassNameExclude. This is fixed now. Fixes GH-4385
🚨 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:
|
🚨 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:
|
🚨 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:
|
🚨 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:
|
📜 Description
Skip creating transactions for UIViewControllers ignored for swizzling via the option swizzleClassNameExclude. Due to some edge cases with nib files, the SDK doesn't swizzle the loadView method of the UIViewController subclasses, but instead, it swizzles the UIViewController.loadView method directly. Although the SDK doesn't swizzle the classes specified in swizzleClassNameExclude, it created transactions. Now, this is fixed.
💡 Motivation and Context
Fixes GH-4386
💚 How did you test it?
Unit test.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps