Investigate adoption of ProfilingManager triggers
Mantenedores costumam responder em até 1 dia
@markushi já está trabalhando nisso.
Desde 21/10/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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?
- Linguagem predominante
- Kotlin
- Estrelas
- 1.4k
- Forks
- 483
- Merge médio
- 2d 54min
- PRs com merge (30d)
- 207
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-java
-
Test the `sentry wizard` Android portTalvez já em andamento @antonis assumiu há 1 dia. AbertaPlatform: Java
getsentry/sentry-java#6797 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Narrow and clean up Android consumer keep rulesTalvez já em andamento @runningcode assumiu há 3 dias. AbertaAndroid Platform: Java
getsentry/sentry-java#6771 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Waiting for: Product Owner
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
getsentry/sentry-java#6758 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Replays
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
getsentry/sentry-java#6741 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Android Bug Platform: Java Replays
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 50/100
getsentry/sentry-java#6740 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de getsentry/sentry-java
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
IacobIonut01/ReFra#1515 · 1 comentário ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
openwatersio/slackwater-android#162 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 Meio dia Facilidade para iniciantes 72/100
developmentwithyash/yaan#184 ·
Mantenedores costumam responder em até 1 dia
-
analytics
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
🐛 Type:Bug 📏 Size: S 🔧 State:In Progress 🔹 Priority: P2 - Medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
yeliqin666/xjtu-toolbox-android#623 · 1 comentário ·