Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Handle ApplicationExitInfo.REASON_MEMORY_LIMITER in MemoryLimiterIntegration

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, kotlin
領域
mobile

調査の方向性

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 の本文から書いたものです。

説明

Android Platform: Java

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.java
  • sentry-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_OTHER
  • exitInfo.getDescription() contains MemoryLimiter:

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 handle REASON_MEMORY_LIMITER in 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_OTHER path 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

getsentry/sentry-java のほかの issue

getsentry/sentry-java の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

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

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