Sentry: iOS killed-in-background heuristic (Phase 7b, optional)

オープン
#83 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
swift

調査の方向性

docs/sentry-integration-plan.md の Phase 7b から始め、次に ios/AppKillHeuristic.swift と iOS のライフサイクル統合ポイントを調べます。偽のストアとクロックを使って AppKillHeuristicTests.swift で、正常なシャットダウン、古いマーカーのクリア、フォアグラウンド/バックグラウンドのタグ付けを検証します。完了の条件は、フォアグラウンドでマーカーが更新され、推論されたイベントが必須フィールドを報告し、文書化された制限事項が正直に記述されていることです。

索引モデルが issue の本文から書いたものです。

説明

priority: P3 sentry

Part of #74. Optional, independent.

Spec: docs/sentry-integration-plan.md Phase 7b.

iOS only tells us "why was the app killed" as 24-hour aggregate counts (Apple's MetricKit reports), with no timestamps. This workblock adds a simple heuristic for per-incident detail: record the app's lifecycle state on disk as it changes, and on the next launch, if the previous run didn't end cleanly, report one "ios kill inferred" event saying whether the app was in the background and roughly how long it had been there.

Deliverables

  • ios/AppKillHeuristic.swift: write background / foreground / terminated-cleanly plus a timestamp to on-device storage on each lifecycle change. On cold start, an unclean previous state produces one event tagged ios.killed_in_background, with last_known_state and time_since_last_state_ms
  • Refresh the marker every 30 seconds while the app is in the foreground, so the "how long" number doesn't badly understate
  • Document the limits honestly: this catches any unclean end — the system killing the app to free memory, iOS killing an unresponsive app, user force-quit, OS reboot, or a crash. The MetricKit counts and crash reports help tell those apart on dashboards

Tests

  • AppKillHeuristicTests.swift with a fake store + clock: a clean shutdown suppresses the event; a stale marker fires once then clears; foreground vs background drives the tag correctly
  • Manual check by forcing a low-memory kill
主要言語
Kotlin
スター
1
フォーク
0
平均マージ
1日 6時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

digidem/comapeo-core-react-native のほかの issue

digidem/comapeo-core-react-native の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。