getsentry / getsentry/sentry-java
profiler.id is always attached, even if ProfilingManager is rate-limiting
- Vorherrschende Sprache
- Kotlin
- Sterne
- 1.4k
- Forks
- 478
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 67
Beschreibung
This has been observed for Perfetto Profiling in our demo app, where a trace had a `profiler.id` set, but the actual profile was missing.
When linking traces and profiles, we link them unconditionally, e.g. here: [https://github.com/getsentry/sentry-java/blob/bcd3e76a8033a30cf291fc84c726d40205b21db2/sentry/src/main/java/io/sentry/SentryTracer.java#L552]()
This stems from `ProfilingManager`, where requests can be rate-limited, and rejections are only reported via async profiling result. Or in other words `PerfettoProfiler.start()` will always return true, and only `processResult` at a later point will be able to detect rate limiting.
Beitragsleitfaden
Rechercherichtung
Start at sentry/src/main/java/io/sentry/SentryTracer.java around the linked trace/profile association, then trace ProfilingManager and PerfettoProfiler.start() through processResult. Confirm how rate-limited profiling results are reported and verify that traces do not receive a profiler.id when the corresponding profile is missing.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- mobile, performance
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 54/100