fix(android): report low-memory kills as app_exit, skip the exit-info backlog on first launch - #8
Draft
nitinstp23 wants to merge 1 commit into
Draft
nitinstp23 wants to merge 1 commit into
nitinstp23 wants to merge 1 commit into
Conversation
… backlog on first launch B14-2074, parity with scout-flutter 0.3.0. ApplicationExitInfo REASON_LOW_MEMORY (the OS reclaiming a cached background process) was written as a native_crash report; Play Console and Crashlytics don't count it and on aggressive OEMs it outnumbers real crashes. The classifier no longer treats it as crash-class; the collector writes it with a scout.span=app_exit marker and the JS reader emits an app_exit span with crash.* renamed to exit.* (exit.reason, exit.description). A first launch with no drain watermark now records one and reports nothing instead of draining up to 50 historical deaths into the session that just started. Version 0.1.18 -> 0.1.19.
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.
Jira: B14-2074 (epic B14-4). Stacked on #7. Parity with scout-flutter #8.
Why
ScoutExitInfoClassifiertreatedApplicationExitInfoREASON_LOW_MEMORY(the OS reclaiming a cached background process) as crash-class, so React Native tenants report background kills asnative_crash. Play Console and Crashlytics never count these; on snabbit's Flutter apps they were 100% of allnative_crashspans. The collector also drained the whole OS exit history (up to 50 records) on the first launch with no watermark, into the session that had just started.What changes
ScoutExitInfoClassifier.crashTypeFor("low_memory")→null; newexitReasonFor()returnslow_memoryfor theapp_exitpath;SPAN_KEY = "scout.span"/APP_EXITmarker on the pending report.ScoutExitInfoCollector.drain:lastTs == 0(no watermark) records the newest timestamp and returns without writing reports.native-crash.ts: reports carryingscout.span: app_exitare emitted asSPAN.APP_EXITwithcrash.*→exit.*(exit.reason,exit.description,exit.importance, …) via the exportedtoAppExitAttributes().SPAN.APP_EXITadded;ERROR_CLASS_SPANSand the view crash counter are untouched, soapp_exitnever counts as a crash and does not bypass sampling.ExitInfoFilterTest.kt(three crash-class reasons,low_memorybenign,exitReasonFortable),native-crash.test.ts(rename shape + marker contract).docs/configuration.md, README; version 0.1.18 → 0.1.19.Verification
vitest: 33 files, 296 tests passing.tsc --noEmitclean for both tsconfigs.android/unit-tests/gradlew test.app_exit, nonative_crash; fresh install → no backlog).Rollout note
Crash counts will drop for apps on 0.1.19; re-baseline alerts on
native_crash.