Skip to content

Profiling regressions after switching to Continuous Profiling (PR #222) #226

Description

@sdzhong

After merging PR #222, three profiling issues
have been observed in the demo app. The app is configured for Trace Lifecycle UI Profiling with 1.0
sample rates per the Android profiling docs:

<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
<meta-data android:name="io.sentry.traces.profiling.session-sample-rate" android:value="1.0" />
<meta-data android:name="io.sentry.traces.profiling.lifecycle" android:value="trace" />
<meta-data android:name="io.sentry.traces.profiling.start-on-app-start" android:value="true" />

(AndroidManifest.xml)

Observations

  1. Profiles not consistently attached to spans — Profiles are no longer reliably linked to their
    associated slow spans (e.g. product_processing). Some events show "Error loading flamegraph /
    Failed to fetch profiles."

  2. Inconsistent profile counts in Explore > Profiles — Counts shown in the profiles list
    (e.g. 11, 10, 4) do not match what appears when clicking into individual transactions
    (e.g. expecting 4 but seeing 1; expecting 10 but seeing 0).

  3. Stats page shows Continuous Profile Hours instead of UI Profile Hours — The Usage Stats page
    changed from UI Profile Hours to Continuous Profile Hours after PR Bump Sentry Gradle plugin 6.1.0 → 6.10.0 + new SDK features #222. Per the
    Sentry docs,
    Continuous Profiling is not available for Android, so this classification appears incorrect.

Root cause (known SDK issue)

Per the Android SDK team: observations 2 and 3 are caused by a known issue where ANR profiles
are being sent and billed as Continuous Profile hours instead of UI Profile hours
. A fix is in
progress. Additional known gaps:

  • ANR profiles are not currently deobfuscated correctly
  • ANR profiles with stack sample size == 1 get dropped (events may appear without profiles despite
    sufficient quota)

Observation 1 (fetch failure) may also be related, but is unconfirmed.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions