Commit bc5c4c9
authored
feat(android): Recover MemoryLimiter app exits on startup (JAVA-687) (#6111)
Introduce a new MemoryLimiterIntegration that captures process deaths attributable to Android 17's new [MemoryLimiter](https://source.android.com/docs/core/perf/memory-limiter#process-monitoring) system service (see also [here](https://android-developers.googleblog.com/2026/06/prioritizing-memory-efficiency-steps-for-android-17.html)).
Process death info is extracted from ApplicationExitInfo on the next app launch. We then enrich it with persisted SDK state and send it to Relay as a fatal Sentry event.
Integration is experimental; is only available for Android API >= 37; and is disabled by default.1 parent 5efb2d7 commit bc5c4c9
19 files changed
Lines changed: 1682 additions & 37 deletions
File tree
- sentry-android-core
- api
- src
- main/java/io/sentry/android/core
- cache
- test/java/io/sentry/android/core
- cache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
337 | 351 | | |
338 | 352 | | |
339 | 353 | | |
| |||
446 | 460 | | |
447 | 461 | | |
448 | 462 | | |
| 463 | + | |
449 | 464 | | |
| 465 | + | |
450 | 466 | | |
451 | 467 | | |
452 | 468 | | |
| |||
480 | 496 | | |
481 | 497 | | |
482 | 498 | | |
| 499 | + | |
483 | 500 | | |
484 | 501 | | |
485 | 502 | | |
486 | 503 | | |
| 504 | + | |
487 | 505 | | |
488 | 506 | | |
489 | 507 | | |
| |||
641 | 659 | | |
642 | 660 | | |
643 | 661 | | |
644 | | - | |
645 | 662 | | |
| 663 | + | |
646 | 664 | | |
647 | 665 | | |
648 | 666 | | |
| |||
747 | 765 | | |
748 | 766 | | |
749 | 767 | | |
| 768 | + | |
| 769 | + | |
750 | 770 | | |
751 | 771 | | |
752 | 772 | | |
753 | 773 | | |
754 | 774 | | |
755 | 775 | | |
| 776 | + | |
756 | 777 | | |
757 | 778 | | |
| 779 | + | |
758 | 780 | | |
759 | 781 | | |
760 | 782 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
437 | 441 | | |
438 | 442 | | |
439 | 443 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
590 | 592 | | |
591 | 593 | | |
592 | 594 | | |
| |||
800 | 802 | | |
801 | 803 | | |
802 | 804 | | |
803 | | - | |
804 | | - | |
805 | | - | |
| 805 | + | |
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
| |||
sentry-android-core/src/main/java/io/sentry/android/core/ApplicationExitInfoHistoryDispatcher.java
Lines changed: 51 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
27 | 44 | | |
28 | 45 | | |
29 | 46 | | |
| |||
70 | 87 | | |
71 | 88 | | |
72 | 89 | | |
73 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
74 | 97 | | |
75 | 98 | | |
76 | 99 | | |
| |||
135 | 158 | | |
136 | 159 | | |
137 | 160 | | |
138 | | - | |
| 161 | + | |
139 | 162 | | |
140 | 163 | | |
141 | 164 | | |
| |||
149 | 172 | | |
150 | 173 | | |
151 | 174 | | |
152 | | - | |
| 175 | + | |
153 | 176 | | |
154 | 177 | | |
155 | 178 | | |
| |||
223 | 246 | | |
224 | 247 | | |
225 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
226 | 258 | | |
| 259 | + | |
| 260 | + | |
227 | 261 | | |
228 | 262 | | |
229 | 263 | | |
230 | | - | |
| 264 | + | |
| 265 | + | |
231 | 266 | | |
| 267 | + | |
232 | 268 | | |
233 | 269 | | |
| 270 | + | |
234 | 271 | | |
235 | 272 | | |
236 | 273 | | |
237 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
238 | 277 | | |
239 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
240 | 286 | | |
241 | 287 | | |
242 | 288 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
256 | 267 | | |
257 | 268 | | |
258 | 269 | | |
| |||
0 commit comments