-
-
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
Startup Profiling 1 - Decouple Profiler from Transaction #3101
Startup Profiling 1 - Decouple Profiler from Transaction #3101
Conversation
…ctionProfiler, allowing to bind one later some cleanup in the profiler
added options as param to AndroidTransactionProfiler.onTransactionFinish
|
Possible breaking changes: |
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b172d4e | 412.60 ms | 492.68 ms | 80.08 ms |
4e29063 | 384.14 ms | 447.74 ms | 63.60 ms |
283d83e | 348.44 ms | 392.06 ms | 43.62 ms |
4e260b3 | 378.73 ms | 454.18 ms | 75.45 ms |
c7e2fbc | 393.98 ms | 478.24 ms | 84.27 ms |
d6d2b2e | 413.20 ms | 486.76 ms | 73.56 ms |
93a76ca | 378.48 ms | 451.78 ms | 73.30 ms |
c3f503e | 360.41 ms | 434.67 ms | 74.27 ms |
1f3652d | 367.21 ms | 438.46 ms | 71.25 ms |
baaf637 | 375.71 ms | 441.58 ms | 65.87 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b172d4e | 1.72 MiB | 2.29 MiB | 578.09 KiB |
4e29063 | 1.72 MiB | 2.29 MiB | 578.38 KiB |
283d83e | 1.72 MiB | 2.29 MiB | 577.69 KiB |
4e260b3 | 1.72 MiB | 2.27 MiB | 554.95 KiB |
c7e2fbc | 1.72 MiB | 2.29 MiB | 576.40 KiB |
d6d2b2e | 1.72 MiB | 2.27 MiB | 555.05 KiB |
93a76ca | 1.72 MiB | 2.29 MiB | 576.75 KiB |
c3f503e | 1.72 MiB | 2.29 MiB | 577.04 KiB |
1f3652d | 1.72 MiB | 2.27 MiB | 554.95 KiB |
baaf637 | 1.72 MiB | 2.27 MiB | 558.42 KiB |
Previous results on branch: feat/early-profiling1-decouple-profiler-transaction
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e42754c | 382.06 ms | 465.49 ms | 83.43 ms |
604628a | 389.84 ms | 456.78 ms | 66.94 ms |
1da0e4d | 375.46 ms | 448.53 ms | 73.07 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
e42754c | 1.72 MiB | 2.27 MiB | 557.10 KiB |
604628a | 1.72 MiB | 2.27 MiB | 558.57 KiB |
1da0e4d | 1.72 MiB | 2.27 MiB | 558.36 KiB |
…saction # Conflicts: # CHANGELOG.md
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.
Looking good! Nice clean cut 🥷 Just left a minor nit
sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
Show resolved
Hide resolved
* added TransactionContext.isForNextStartup * added SentryOptions.enableStartupProfiling * added SentryStartupProfilingOptions class with Json ser/deser * added startupProfilingConfigFile deletion and creation on init * added sampling decision on SDK init with isForNextStartup flag set to true * added SentryOptions.getCacheDirPathWithoutDsn for startupProfiling config file * Startup Profiling 3 - Add ContentProvider and start profile (#3128) * first activity transaction now inherits startup sampling decision, if available * if a startup profiler was instantiated, it will be reused in AndroidOptionsInitializer, instead of creating a new one * added ITransactionProfiler.isRunning * startup profiler and sampling decision is stored in AppStartMetrics * startup profile is bound to the startup transaction * added io.sentry.profiling.enable-startup manifest option * moved profilingTracesHz from SentryAndroidOptions to SentryOptions * added startup profiling launch in SentryPerformanceProvider * added isStartupTransaction to TransactionOptions
…saction # Conflicts: # CHANGELOG.md
📜 Description
removed the need of a transaction to start a profile in AndroidTransactionProfiler, allowing to bind one later
added a constructor to AndroidTransactionProfiler without options
added options as param to AndroidTransactionProfiler.onTransactionFinish
some cleanup in the profiler
💡 Motivation and Context
For the startup profiling feature, we need to create a profiler instance before the SDK is initialized, which means we don't have the options and cannot start any transaction, yet.
This change allows to create an instance of the profiler with only the parameters needed, without passing the whole SentryOptions object, and also allows to run the profiler before the transaction, and bind a transaction later on.
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps