Investigate adoption of ProfilingManager triggers
メンテナーはふだん 1 日以内に返信
@markushi がすでに取り組んでいます。
2026年10月21日 から。
評価
この issue はまだ評価されていません。
説明
The ProfilingManager API offers a way to setup trigger based profiling (ref: https://developer.android.com/reference/android/os/ProfilingManager#addProfilingTriggers(java.util.List%3Candroid.os.ProfilingTrigger%3E)), giving us profiles for critical moments within the app's lifecycle.
The expected flow
- the SDK sets up triggers using
.addProfilingTriggers() - the SDK setups a results listener using
.registerForAllProfilingResults() - the SDK consumes the results via the listener / or (e.g. when the app gets killed) on the next app start (TBD: confirm if the listener re-delivers the profile, or if we need to scan the directory for profiles)
In contrast, our SDK right now only uses the requestProfiling()API and can only handle call stack profiles. (https://github.com/getsentry/sentry-java/blob/a5555eaf0f620eb63285e9d50ee239bfabff7c5e/sentry-android-core/src/main/java/io/sentry/android/core/PerfettoProfiler.java).
Investigation Scope
- Find out which triggers would be interesting for us
- Investigate what each trigger produces (see https://developer.android.com/reference/android/os/ProfilingManager#constants_1 for the types)
- Investigate the impact of having the existing profiler running side by side with the triggers (e.g. do multiple listeners receive all profiling results, can there be only one listener, who wins, are there any race conditions)
- For all
PROFILING_TYPE_STACK_SAMPLINGprofiles- Would it fit into our
profile_chunkmodel? The main concerns are the profile duration and profile size. - Can we link those
profile_chunksto transactions or errors (viaevent.context.profiler.profiler_id)?- For example a cold app start profile could be linked to the
app.starttransaction - But as ProfilingManager runs in parallel to our sentry transaction model, is it feasible to link them? Are there timing races? When does the system deliver the results?
- For example a cold app start profile could be linked to the
- Would it fit into our
Out of Scope
- Any kind of heap dump profiles
- For
PROFILING_TYPE_SYSTEM_TRACEprofiles- Could it be feasible to parse the trace on the SDK side, similar to what we do for tombstones via https://github.com/abovevacant/epitaph, and transform them into transactions?
- What's their size?
- Could it be feasible to add them as event attachments? If so, could we link them in time?
- 主要言語
- Kotlin
- スター
- 1.4k
- フォーク
- 483
- 平均マージ
- 2日 54分
- マージ済み PR(30日)
- 207
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-java のほかの issue
-
Test the `sentry wizard` Android port対応中かも @antonis が 1 日前に担当しました。 オープンPlatform: Java
getsentry/sentry-java#6797 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Narrow and clean up Android consumer keep rules対応中かも @runningcode が 3 日前に担当しました。 オープンAndroid Platform: Java
getsentry/sentry-java#6771 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Android Bug Platform: Java Waiting for: Product Owner
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
getsentry/sentry-java#6758 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Android Bug Platform: Java Replays
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
getsentry/sentry-java#6741 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Android Bug Platform: Java Replays
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
getsentry/sentry-java#6740 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-java の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
IacobIonut01/ReFra#1515 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
openwatersio/slackwater-android#162 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 半日 初心者へのやさしさ 72/100
developmentwithyash/yaan#184 ·
メンテナーはふだん 1 日以内に返信
-
analytics
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
🐛 Type:Bug 📏 Size: S 🔧 State:In Progress 🔹 Priority: P2 - Medium
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
yeliqin666/xjtu-toolbox-android#623 · コメント 1 件 ·