getsentry / getsentry/sentry-java
Support multi-process scope sync
未關閉
還沒有人認領這個 Issue。
Android
Errors
Improvement
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 72
描述
Description
Currently if the Android SDK is used in an multi-process app, the scopes are not synchronized between processes, meaning breadcrumbs/tags/contexts from one process will not show up for errors from another. We should probably introduce a flag to make this opt-in, and to make it work we can do one of the following:
- Communicate between processes using
IBinderthrough a bound service and package data as Parcelable. Here's a good example on implementing IPC: https://github.com/perihanmirkelam/IPC-Examples - Persist the scope data to disk from both processes and when an error occurs in any of them, use the persisted data in favour of what's currently in-memory. We already do persist the data for ANRs, so it could be as simple as replacing our MainEventProcessor and DefaultAndroidEventProcessor with a new one that reads the data from disk (use AnrV2EventProcessor as prior art).
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
閱讀 sentry-android-core/src/main/java/io/sentry/android/core/AnrV2EventProcessor.java,並將其與所參照的 MainEventProcessor 和 DefaultAndroidEventProcessor 實作進行比較。選擇一種 opt-in 同步方式,並驗證當另一個程序回報錯誤時,一個程序中的 breadcrumbs、tags 和 contexts 是否可用。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android
- 領域
- mobile-dev
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100