Skip to content

Crashlytics exception handler #6267

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

Merged
merged 11 commits into from
Sep 18, 2024
Merged

Conversation

themiswang
Copy link
Contributor

Revert the old reversion #6191
merge back feature branch

themiswang and others added 11 commits September 17, 2024 14:56
we are sending a task within a task for common worker which cause the
async behavior, remove the re-submitting task for report finalization
Avoid `Task`s in `checkForPreviousCrash`. This is a step towards
removing the nasty `awaitEvenIfOnMainThread`.
Deprecate `awaitEvenIfOnMain`. Next PR will be to drain the worker and
remove this util.
Adjust time out and disk worker as discussed. This moves some things off
the disk worker, but we plan to put them back after more refactoring.
Make init suspend on settings only, not on race. This allows us to avoid
having a separate queue just for init and settings.

If the app has unsent reports, but data collection and send unsent
reports both have not been triggered, still let user actions queue up.
Add a precondition check for not main thread. This is more useful when
we just want to enforce not main thread, not a specific thread.
Make doBackgroundInitializationAsync submit a callable instead of submit
task

Submit task results in a blocking behaviour when `SettingsTask` cannot
be resolved during initialization
Remove un-necessary task return
Copy link
Contributor

github-actions bot commented Sep 17, 2024

Release note changes

The following release notes were modified. Please ensure they look correct.

Release Notes
firebase-crashlytics
### {{crashlytics}} version 19.1.1 {: #crashlytics_v19-1-1}

* {{fixed}} Improved data consistency for rapid user actions.

* {{changed}} Internal changes to improve startup time.

* {{changed}} Internal changes to the way background tasks are scheduled.

* {{changed}} Migrated SDK to use standard Firebase executors.

#### {{crashlytics}} Kotlin extensions version 19.1.1 {: #crashlytics-ktx_v19-1-1}

The Kotlin extensions library transitively includes the updated
`firebase-crashlytics` library. The Kotlin extensions library has no additional
updates.

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-crashlytics

    Overall coverage changed from 11.22% (e6b4ace) to 11.57% (6b496ab) by +0.35%.

    FilenameBase (e6b4ace)Merge (6b496ab)Diff
    CrashlyticsController.java16.10%18.57%+2.46%
    CrashlyticsCore.java0.61%0.61%+0.01%
    CrashlyticsTasks.java?0.00%?
    CrashlyticsWorker.java0.00%37.21%+37.21%
    CrashlyticsWorkers.kt?42.31%?
    DataCollectionArbiter.java83.33%84.27%+0.94%
    IdManager.java2.74%2.63%-0.11%
    SessionReportingCoordinator.java42.11%42.20%+0.09%
    UserMetadata.java22.12%22.33%+0.21%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/gh18QZYTwS.html

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-crashlytics

    TypeBase (e6b4ace)Merge (6b496ab)Diff
    aar419 kB410 kB-8.21 kB (-2.0%)
    apk (aggressive)695 kB698 kB+2.82 kB (+0.4%)
    apk (release)5.85 MB5.85 MB+228 B (+0.0%)
  • firebase-crashlytics-ndk

    TypeBase (e6b4ace)Merge (6b496ab)Diff
    apk (aggressive / arm64-v8a)1.86 MB1.87 MB+4.10 kB (+0.2%)
    apk (aggressive / armeabi-v7a)1.34 MB1.34 MB+4.10 kB (+0.3%)
    apk (aggressive / x86)1.84 MB1.85 MB+4.10 kB (+0.2%)
    apk (aggressive / x86_64)1.91 MB1.91 MB+4.10 kB (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/bd5ZNZzCSN.html

@google-oss-bot
Copy link
Contributor

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-cls

    DeviceStatisticsDistributions
    oriole-32
    Percentilee6b4ace6b496abDiffSignificant (?)
    p109.41 ±0.5 ms9.44 ±2 ms+31.0 μs (+0.3%)NO
    p259.93 ±0.6 ms9.90 ±3 ms-23.8 μs (-0.2%)NO
    p5010.7 ±0.7 ms10.7 ±3 ms+41.2 μs (+0.4%)NO
    p7511.8 ±0.9 ms11.7 ±3 ms-113 μs (-1.0%)NO
    p9012.9 ±0.9 ms12.8 ±3 ms-126 μs (-1.0%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
    redfin-30
    Percentilee6b4ace6b496abDiffSignificant (?)
    p1012.8 ±3 ms12.1 ±3 ms-706 μs (-5.5%)NO
    p2513.4 ±3 ms12.8 ±3 ms-651 μs (-4.9%)NO
    p5014.2 ±4 ms13.9 ±4 ms-358 μs (-2.5%)NO
    p7515.3 ±5 ms15.3 ±5 ms-37.3 μs (-0.2%)NO
    p9017.0 ±5 ms17.2 ±6 ms+241 μs (+1.4%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
  • fire-rc

    DeviceStatisticsDistributions
    oriole-32
    Percentilee6b4ace6b496abDiffSignificant (?)
    p10109 ±41 μs260 ±332 μs+151 μs (+138.3%)NO
    p25116 ±43 μs270 ±342 μs+155 μs (+133.8%)NO
    p50128 ±48 μs287 ±360 μs+159 μs (+124.7%)NO
    p75161 ±54 μs318 ±379 μs+157 μs (+97.9%)NO
    p90213 ±61 μs377 ±437 μs+165 μs (+77.4%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
    redfin-30
    Percentilee6b4ace6b496abDiffSignificant (?)
    p10463 ±480 μs374 ±472 μs-89.3 μs (-19.3%)NO
    p25549 ±573 μs431 ±548 μs-118 μs (-21.4%)NO
    p50671 ±684 μs531 ±689 μs-140 μs (-20.9%)NO
    p75866 ±862 μs665 ±845 μs-201 μs (-23.2%)NO
    p901.14 ±1 ms870 ±984 μs-268 μs (-23.6%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
  • fire-sessions

    DeviceStatisticsDistributions
    oriole-32
    Percentilee6b4ace6b496abDiffSignificant (?)
    p102.91 ±0.8 ms2.98 ±0.9 ms+67.2 μs (+2.3%)NO
    p253.09 ±0.9 ms3.19 ±1 ms+104 μs (+3.4%)NO
    p503.40 ±0.9 ms3.51 ±1 ms+110 μs (+3.2%)NO
    p753.89 ±1 ms4.13 ±1 ms+232 μs (+6.0%)NO
    p904.68 ±1 ms4.88 ±1 ms+199 μs (+4.2%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
    redfin-30
    Percentilee6b4ace6b496abDiffSignificant (?)
    p106.51 ±2 ms6.05 ±1 ms-463 μs (-7.1%)NO
    p257.15 ±2 ms6.47 ±2 ms-681 μs (-9.5%)NO
    p508.17 ±3 ms7.06 ±2 ms-1.11 ms (-13.5%)NO
    p759.52 ±5 ms7.81 ±3 ms-1.71 ms (-18.0%)NO
    p9011.0 ±6 ms8.79 ±4 ms-2.24 ms (-20.3%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentilee6b4ace6b496abDiffSignificant (?)
    p10201 ±6 ms204 ±3 ms+3.13 ms (+1.6%)NO
    p25207 ±7 ms210 ±4 ms+3.60 ms (+1.7%)NO
    p50214 ±8 ms218 ±4 ms+3.82 ms (+1.8%)NO
    p75222 ±7 ms226 ±5 ms+3.68 ms (+1.7%)NO
    p90230 ±8 ms235 ±6 ms+4.37 ms (+1.9%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT
    redfin-30
    Percentilee6b4ace6b496abDiffSignificant (?)
    p10243 ±3 ms266 ±4 ms+22.9 ms (+9.4%)YES
    p25248 ±4 ms272 ±5 ms+24.0 ms (+9.7%)YES
    p50255 ±3 ms280 ±7 ms+25.6 ms (+10.0%)MAYBE
    p75263 ±3 ms290 ±9 ms+27.5 ms (+10.4%)MAYBE
    p90271 ±3 ms305 ±14 ms+34.1 ms (+12.6%)NO

    19 test runs in comparison
    CommitTest Runs
    e6b4ace
    • 2024-09-13_21:33:18.153423_tybq
    • 2024-09-13_21:33:18.153470_TEIX
    • 2024-09-13_21:33:18.153482_Svhk
    • 2024-09-13_21:33:18.153491_ucam
    • 2024-09-13_21:33:18.153504_DfiQ
    • 2024-09-13_21:33:18.153509_XuZN
    • 2024-09-13_21:33:18.153513_Ejcq
    • 2024-09-13_21:33:18.153525_sRYx
    • 2024-09-13_21:33:18.153529_djIM
    6b496ab
    • 2024-09-17_19:20:50.536386_hYsT
    • 2024-09-17_19:20:50.536425_JdKO
    • 2024-09-17_19:20:50.536436_niaU
    • 2024-09-17_19:20:50.536445_iOpu
    • 2024-09-17_19:20:50.536454_Bpgc
    • 2024-09-17_19:20:50.536462_Sotq
    • 2024-09-17_19:20:50.536470_ygxn
    • 2024-09-17_19:20:50.536478_TxOM
    • 2024-09-17_19:20:50.536486_crrW
    • 2024-09-17_19:20:50.536494_MyKT

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/13Jgl0Tj1W/index.html

Copy link
Contributor

Unit Test Results

  8 files   -   80    8 suites   - 80   23s ⏱️ - 2m 16s
22 tests  - 371  22 ✔️  - 371  0 💤 ±0  0 ±0 
44 runs   - 742  44 ✔️  - 742  0 💤 ±0  0 ±0 

Results for commit f357632. ± Comparison against base commit e6b4ace.

This pull request removes 371 tests.
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_emptyLocationHeader_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_isNotRedirectResponse_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_missingLocationHeader_setsDownloadFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_onAppResume_setsUpdateCancelled
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_whenAabReleaseAvailable_redirectsToPlay
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateAppTask_whenOpenConnectionFails_setsNetworkFailure
com.google.firebase.appdistribution.impl.AabUpdaterTest ‑ updateApp_whenCalledMultipleTimesWithAAB_onlyMakesOneRequest
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ installActivityDestroyed_setsInstallError
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ installApk_currentActivityNotNull_InstallIntentOnCurrentActivity
com.google.firebase.appdistribution.impl.ApkInstallerTests ‑ whenCalledMultipleTimes_onlyEmitsOneIntent
…

@themiswang themiswang merged commit 6e7e04e into main Sep 18, 2024
46 checks passed
@themiswang themiswang deleted the crashlytics-exception-handler-test branch September 18, 2024 13:28
@firebase firebase locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants