Skip to content

fix(android): [Legacy Profiling 2] Prefer UI profiling on API 35 - #6850

Draft
adinauer wants to merge 1 commit into
feat/disable-legacy-profiling-default-v9from
feat/disable-legacy-profiling-default-v9-prefer-ui
Draft

adinauer wants to merge 1 commit into
feat/disable-legacy-profiling-default-v9from
feat/disable-legacy-profiling-default-v9-prefer-ui

Conversation

@adinauer

@adinauer adinauer commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Legacy Profiling)


📜 Description

Prefers Perfetto-based UI Profiling on Android API 35 and newer when both transaction profiling and session profiling are configured. The ignored profilesSampleRate and profilesSampler settings are cleared so all runtime sampling checks consistently use UI Profiling.

Below API 35, the existing explicit legacy transaction profiling precedence remains unchanged.

💡 Motivation and Context

This follows up on review feedback for #6837. Only one profiler should run at a time, and when the safe Perfetto backend is available it should take precedence over the deprecated Debug-based transaction profiler.

💚 How did you test it?

  • ./gradlew :sentry-android-core:testReleaseUnitTest --tests io.sentry.android.core.AndroidOptionsInitializerTest
  • make format api

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

#skip-changelog

When transaction and session profiling are both configured on API 35
and newer, ignore the legacy transaction settings and select Perfetto.
Keep the existing transaction precedence on older Android versions.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 6a6fda9.

Main concerns: data sent to Sentry, reach, public contract.

This label is a hint for reviewers, not an approval.

@sentry

sentry Bot commented Dec 3, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.66.0 (1) release

⚙️ sentry-android Build Distribution Settings

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant