Skip to content

Commit

Permalink
Update text/0143-sdk-fail-safe-mode.md
Browse files Browse the repository at this point in the history
Co-authored-by: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com>
  • Loading branch information
philipphofmann and JoshuaMoelans authored Jan 20, 2025
1 parent c09bd29 commit 44cae89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion text/0143-sdk-fail-safe-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ We want to focus on continuous SDK crashes, and the following points are out of
The recommended approach solves the three problems mentioned [above](#background):

1. [A: Detecting a continuously crashing SDK](#a-detecting-continuous-sdk-crashes) with [Checkpoints](#option-a1).
2. [B: Minimizing the damage of a continuously crashing SDK](b-minimizing-the-damage) with [Safe Mode](#option-b1) and [NoOp Init](#option-b2).
2. [B: Minimizing the damage of a continuously crashing SDK](#b-minimizing-the-damage) with [Safe Mode](#option-b1) and [NoOp Init](#option-b2).
3. [C: Knowing when and why the SDK is continuously crashing](#c-knowing-when-the-sdk-is-disabled) with [Failing SDK Event](#option-c4) and [Retry Logic](#option-c2).

After detecting a potential SDK crash via [checkpoints](#option-a1), the SDK switches to a [safe SDK mode](#option-b1), a bare minimum SDK with only essential features. When the SDK initialization fails in the safe mode, the SDK makes the initialization a [NoOp (no operation)](#option-b2), communicating this with a [failing SDK event](#option-c4). When in fail-safe mode, the SDK adds a yet-to-be-defined field in the SDK context so that we and our users know when it is active. To minimize the risk of staying incorrectly in the NoOp mode, the SDK implements a [retry logic](#option-c2), which switches to the safe mode after being initialized x times in the NoOp mode. The same applies to the safe mode. The SDK switches back to a normal initialization after being initalized x times in the safe mode. While the retry mode will yield further crashes in the worst-case scenario, it ensures our users still receive some SDK crashes in the App Store Connect and the Google Play Console, which is essential for fixing the root cause. We accept this tradeoff over completely flying blind. We might use the [stacktrace detection](#option-a3) in addition to the checkpoints on platforms that allow it.
Expand Down

0 comments on commit 44cae89

Please sign in to comment.