Handle ApplicationExitInfo.REASON_MEMORY_LIMITER in MemoryLimiterIntegration
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
調査の方向性
Start in sentry-android-core/src/main/java/io/sentry/android/core/MemoryLimiterIntegration.java by reading MemoryLimiterPolicy.matches(...), then inspect sentry-android-core/src/test/java/io/sentry/android/core/MemoryLimiterIntegrationTest.kt. Add coverage for ApplicationExitInfo.REASON_MEMORY_LIMITER while preserving the REASON_OTHER plus MemoryLimiter: behavior, and verify compatibility with older SDK stubs and the existing tests.
索引モデルが issue の本文から書いたものです。
説明
Summary
MemoryLimiterIntegration currently recognizes MemoryLimiter process deaths only when ApplicationExitInfo.getReason() == REASON_OTHER and the description contains the MemoryLimiter: prefix.
Android 17 / API 37.2 added ApplicationExitInfo.REASON_MEMORY_LIMITER, and our integration does not account for it yet. That means newer platform versions can report a dedicated MemoryLimiter reason that we may fail to capture.
Relevant code:
sentry-android-core/src/main/java/io/sentry/android/core/MemoryLimiterIntegration.javasentry-android-core/src/test/java/io/sentry/android/core/MemoryLimiterIntegrationTest.kt
Android reference:
Current Behavior
MemoryLimiterPolicy.matches(...) currently returns true only when:
exitInfo.getReason() == ApplicationExitInfo.REASON_OTHERexitInfo.getDescription()containsMemoryLimiter:
Expected Behavior
MemoryLimiterIntegration should also recognize exits reported with ApplicationExitInfo.REASON_MEMORY_LIMITER.
We should preserve current behavior for existing REASON_OTHER + MemoryLimiter: records, since older platform behavior may still surface that combination.
Acceptance Criteria
- Update
MemoryLimiterPolicy.matches(...)to handleREASON_MEMORY_LIMITERin addition to the existing legacy path. - Keep backward compatibility for older Android versions / SDK stubs where the new constant may not be available at compile or runtime.
- Add regression tests covering the dedicated MemoryLimiter reason.
- Verify existing tests around the legacy
REASON_OTHERpath still pass.
Notes
The implementation may need to avoid directly referencing the new constant from older compile targets if that creates compatibility issues with our current Android SDK setup.
- 主要言語
- Kotlin
- スター
- 1.4k
- フォーク
- 478
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 71
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-java のほかの issue
-
Improvement Java Platform: Android Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-java#6145 · コメント 1 件 · 担当者 1 名 ·
-
Bug Java Platform: Android Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-java#6138 · コメント 1 件 ·
-
Feature Java Platform: Java Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-java#5984 · コメント 1 件 ·
-
Android Task Traces
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-java#5376 · コメント 1 件 ·
-
Android Docs Errors
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
getsentry/sentry-java#5375 · コメント 1 件 ·
getsentry/sentry-java の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
AAswordman/Operit#1265 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
acristescu/OnlineGo#216 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
libre-tube/LibreTube#8803 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
status: waiting-for-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
spring-projects/spring-security#19781 ·