Repository navigation
Conversation
Require applications to explicitly opt into the crash-prone Debug-based profiler while keeping the legacy implementation available for version 9. Deprecate the option for removal in version 10 and preserve Perfetto continuous profiling on API 35 and newer. Refs GH-5094 Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Contributor
PR risk: highFor commit Main concerns: public contract, reach, data sent to Sentry. This label is a hint for reviewers, not an approval. |
adinauer
commented
Dec 2, 2026
| <meta-data | ||
| android:name="io.sentry.traces.profiling.session-sample-rate" | ||
| android:value="1.0" /> | ||
| <!-- Deprecated: temporarily opt into profiling below API 35. Removed in version 10. --> |
Member
Author
There was a problem hiding this comment.
Should we remove this again so people don't get drawn into something we'll remove in v10?
📲 Install BuildsAndroid
|
Close a continuous profiler started from previous-launch configuration when the current options disable legacy profiling. This prevents the current opt-out from retaining the crash-prone legacy backend. Co-Authored-By: Claude <noreply@anthropic.com>
adinauer
marked this pull request as ready for review
December 2, 2026 16:01
adinauer
requested review from
0xadam-brown and
runningcode
and removed request for
a team
December 2, 2026 16:01
runningcode
reviewed
Dec 3, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
So my understanding is that we only ever enable one profiler at a time. That make sense since they consume a lot of resources.
The way the code here is set, it seems like if both are enabled, we prefer the deprecated one, can we change that to prefer the UI Profiling?
We should probably make this behavior when both are enabled more clear in the docs and maybe the changelog too.
Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
This was referenced Dec 3, 2026
adinauer
changed the base branch from
9.x.x
to
feat/disable-legacy-profiling-default-v9-stack
December 3, 2026 15:06
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Legacy Profiling)
📜 Description
Changes the Android
enableLegacyProfilingdefault fromtruetofalsefor version 9. The legacyDebug-based transaction and continuous profilers remain available, but applications must explicitly opt in on API levels below 35 or when using transaction-based profiling.The option is now deprecated for removal in version 10. API 35+ continues to use Perfetto continuous profiling, including when a legacy transaction profiling sample rate is still configured. Persisted pre-v9 app-start profiling configuration is ignored so it cannot enable the legacy profiler once after an upgrade.
💡 Motivation and Context
Android's legacy runtime tracer can cause Android Runtime crashes. Disabling it by default reduces that risk without removing profiling V1 or the pre-API-35 backend during the version 9 release cycle.
Refs #5094
💚 How did you test it?
./gradlew :sentry:clean :sentry:test --tests io.sentry.SentryOptionsTest --tests io.sentry.JsonSerializerTest --tests io.sentry.SentryTest./gradlew :sentry-android-core:testReleaseUnitTest --tests io.sentry.android.core.AndroidOptionsInitializerTest --tests io.sentry.android.core.ManifestMetadataReaderTest --tests io.sentry.android.core.SentryPerformanceProviderTestmake format api📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
getsentry/sentry-docsand onboarding ingetsentry/sentrybefore the version 9 release.