feat: Split up UIKit and App Init App Start Spans#3534
Merged
Conversation
Split the UIKit and Application Init span into one span for UIKit Init and another for Application Init. The UIKit Init span ends when the users start the SentrySDK. We recommend that the SentrySDK is the first to call in the UIApplication.didFinishLaunching method because otherwise, users won't receive any potential crash reports for code running before our SDK. Therefore, we pick the start time of our SDK as when the UIApplicationDelegate.didFinishLaunching is called. Fixes GH-3345
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Split up UIKit and App Init App Start Spans ([#3534](https://github.com/getsentry/sentry-cocoa/pull/3534))If none of the above apply, you can opt out of this check by adding |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3534 +/- ##
=============================================
+ Coverage 89.213% 89.234% +0.020%
=============================================
Files 528 528
Lines 57620 57472 -148
Branches 20637 20334 -303
=============================================
- Hits 51405 51285 -120
- Misses 5185 5271 +86
+ Partials 1030 916 -114
... and 86 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e681215 | 6240.94 ms | 6254.36 ms | 13.42 ms |
| 4053ee9 | 1248.04 ms | 1250.82 ms | 2.78 ms |
| 302ee8b | 1194.02 ms | 1223.34 ms | 29.32 ms |
| 25bcc50 | 1240.47 ms | 1254.70 ms | 14.23 ms |
| cce35c6 | 1228.88 ms | 1241.14 ms | 12.26 ms |
| 7bb0873 | 1226.18 ms | 1247.30 ms | 21.12 ms |
| 10ee2ce | 1250.90 ms | 1258.57 ms | 7.67 ms |
| 7bc3c0d | 1212.35 ms | 1228.94 ms | 16.59 ms |
| f587451 | 1271.63 ms | 1275.90 ms | 4.27 ms |
| d61b939 | 1238.61 ms | 1240.08 ms | 1.47 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e681215 | 20.76 KiB | 431.91 KiB | 411.15 KiB |
| 4053ee9 | 20.76 KiB | 435.22 KiB | 414.46 KiB |
| 302ee8b | 20.76 KiB | 419.62 KiB | 398.87 KiB |
| 25bcc50 | 20.76 KiB | 427.22 KiB | 406.46 KiB |
| cce35c6 | 20.76 KiB | 425.80 KiB | 405.04 KiB |
| 7bb0873 | 22.85 KiB | 407.09 KiB | 384.24 KiB |
| 10ee2ce | 20.76 KiB | 427.77 KiB | 407.00 KiB |
| 7bc3c0d | 20.76 KiB | 427.35 KiB | 406.59 KiB |
| f587451 | 20.76 KiB | 435.25 KiB | 414.49 KiB |
| d61b939 | 22.85 KiB | 407.63 KiB | 384.78 KiB |
Previous results on branch: feat/did-finish-launching-span
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 443cce2 | 1203.04 ms | 1220.21 ms | 17.17 ms |
| baaa45f | 1214.87 ms | 1245.02 ms | 30.15 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 443cce2 | 21.58 KiB | 418.82 KiB | 397.24 KiB |
| baaa45f | 21.58 KiB | 418.82 KiB | 397.24 KiB |
This was referenced Jan 4, 2024
philipphofmann
added a commit
that referenced
this pull request
Jan 10, 2024
Split the UIKit and Application Init span into one span for UIKit Init and another for Application Init. The UIKit Init span ends when the users start the SentrySDK. We recommend that the SentrySDK is the first to call in the UIApplication.didFinishLaunching method because otherwise, users won't receive any potential crash reports for code running before our SDK. Therefore, we pick the start time of our SDK as when the UIApplicationDelegate.didFinishLaunching is called. Fixes GH-3345
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Split the UIKit and Application Init span into one span for UIKit Init and another for Application Init. The UIKit Init span ends when the users start the SentrySDK. We recommend that the SentrySDK is the first to call in the UIApplication.didFinishLaunching method because otherwise, users won't receive any potential crash reports for code running before our SDK. Therefore, we pick the start time of our SDK as when the UIApplicationDelegate.didFinishLaunching is called.
Docs PR getsentry/sentry-docs#8814.
Before
Now
💡 Motivation and Context
Fixes GH-3345
💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.🔮 Next steps