fix(profiling): Disable transaction-based profiling when enableLegacyProfiling is false#5765
Open
markushi wants to merge 2 commits into
Open
Conversation
…Profiling is false Transaction-based profiling (profilesSampleRate/profilesSampler) always relies on the legacy Debug-based profiler and is not supported by the ProfilingManager (Perfetto) backend. Previously enableLegacyProfiling only controlled continuous profiling, so profilesSampleRate + enableLegacyProfiling=false would still run the legacy transaction profiler. Now setting enableLegacyProfiling to false also disables transaction-based profiling on all devices, logging a warning to guide users towards profileSessionSampleRate for continuous profiling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
af1a5cb to
201d373
Compare
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
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.
Summary
Broadens
enableLegacyProfilingso that setting it tofalsealso disables transaction-based profiling (profilesSampleRate/profilesSampler), not just continuous profiling.Why
Transaction-based profiling always relies on the legacy
Debug-based profiler — it is not supported by the ProfilingManager (Perfetto) backend. PreviouslyenableLegacyProfilingonly controlled continuous profiling, which led to a confusing combination:Per discussion, it's sensible that
enableLegacyProfilingdisables transaction-based profiling too.Changes
AndroidOptionsInitializer.setupProfiler: when the transaction-based path is selected butenableLegacyProfilingisfalse, no-op both profilers, close any app-start profiler, and log a warning guiding users towardsprofileSessionSampleRate(continuous profiling).SentryOptions.isEnableLegacyProfiling/setEnableLegacyProfilingjavadoc.sentry-docschange (Perfetto profiling /enableLegacyProfilingoption).🤖 Generated with Claude Code