-
-
Notifications
You must be signed in to change notification settings - Fork 435
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 app start span end-time is wrong if SDK init is deferred #2519
Conversation
This way the appstart start/end times are properly tracked, even if the SDK is not initialized yet. In case of a deferred SDK init, the app start span will be attached to the first tracked Activity after SDK init.
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5fa24ec | 326.29 ms | 384.53 ms | 58.24 ms |
c1399c1 | 345.06 ms | 385.49 ms | 40.43 ms |
754021c | 358.70 ms | 361.98 ms | 3.28 ms |
14c083a | 350.82 ms | 388.86 ms | 38.04 ms |
f6a135d | 263.96 ms | 383.59 ms | 119.63 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5fa24ec | 1.73 MiB | 2.33 MiB | 620.61 KiB |
c1399c1 | 1.73 MiB | 2.33 MiB | 620.61 KiB |
754021c | 1.73 MiB | 2.33 MiB | 623.06 KiB |
14c083a | 1.73 MiB | 2.33 MiB | 620.61 KiB |
f6a135d | 1.73 MiB | 2.33 MiB | 623.10 KiB |
Previous results on branch: fix/app-start-time-deferred-sdk-init
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8a9e6d9 | 320.86 ms | 362.48 ms | 41.62 ms |
15e2361 | 321.98 ms | 390.90 ms | 68.92 ms |
301557d | 310.90 ms | 362.35 ms | 51.46 ms |
0a8bf63 | 313.18 ms | 355.65 ms | 42.47 ms |
099f7ad | 361.06 ms | 364.21 ms | 3.15 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8a9e6d9 | 1.73 MiB | 2.33 MiB | 623.40 KiB |
15e2361 | 1.73 MiB | 2.33 MiB | 623.40 KiB |
301557d | 1.73 MiB | 2.33 MiB | 623.40 KiB |
0a8bf63 | 1.73 MiB | 2.33 MiB | 623.39 KiB |
099f7ad | 1.73 MiB | 2.33 MiB | 623.40 KiB |
Codecov ReportBase: 80.18% // Head: 80.18% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #2519 +/- ##
=========================================
Coverage 80.18% 80.18%
Complexity 3943 3943
=========================================
Files 323 323
Lines 14896 14896
Branches 1965 1965
=========================================
Hits 11944 11944
Misses 2178 2178
Partials 774 774 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/SentryPerformanceProvider.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍 a couple of minor comments
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
@marandaneto would you like to take a look at this? Was there a reason why we have not capture the app start span end time in the same provider where we capture the start time? |
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java
Outdated
Show resolved
Hide resolved
Most likely because we offer the possibility of no content providers (docs tell how to remove them). |
This way the appstart start/end times are properly tracked, even if the
SDK is not initialized yet. In case of a deferred SDK init, the app
start span will be attached to the first tracked Activity after SDK
init.
💡 Motivation and Context
Fixes #2518
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps