getsentry / getsentry/sentry-java
Capture logcat output as attachment
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 72
描述
### Problem Statement
Through this issue, we started capturing logcat logs as breadcrumb:
* https://github.com/getsentry/sentry-java/issues/1620
We used the gradle plugin and bytecode manipulation to capture the logcat API done by libraries in the app itself. But that means we're not capturing system logs, for example.
@romtsn said:
> this works for the app and libraries logcat calls, but not the system ones. Also it supports all Android versions, while this approach is from API 23 and above.
We received a PR in the .NET SDK
* https://github.com/getsentry/sentry-dotnet/pull/2926
That adds logcat logs as attachments (**opt-in**) with mime type `text/logcat`. And a ticket was created to have a custom preview in Sentry:
* https://github.com/getsentry/sentry/issues/61005
Ideally this is available for all cross platform SDKs like React Native and Flutter. If it can't be made available through the native bridget, we can duplicate this ticket in the other repos.
貢獻指南
研究方向
先閱讀現有的 logcat breadcrumb 擷取實作和連結的 sentry-dotnet pull request,接著比較在支援的不同 API level 上存取 Android logcat 的運作方式。定義 opt-in 附件行為,並驗證擷取的輸出是否以 mime type text/logcat 傳送;該 issue 未提供可執行的 repository 檔案或測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, kotlin
- 領域
- mobile-dev, observability
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100