feat(profiling): Add Android ProfilingManager (Perfetto) support - #5251
Merged
Merged
Conversation
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.
📜 Description
Adds support for Android's
ProfilingManagerAPI (API 35+), which captures continuous profiles (profile chunks) using OS-level Perfetto stack sampling instead of the legacyDebug.startMethodTracingSamplingengine.Behavior by API level:
ProfilingManageris used automatically. No configuration needed.Debug-based profiler is used, controlled by the newenableLegacyProfilingoption.⚙️ New options
enableLegacyProfilingio.sentry.profiling.enable-legacy-profilingtrueDebug-based profiler on API < 35. Set tofalseto disable profiling on those devices. Has no effect on API 35+. Will be deprecated in the next major and removed after.enableLegacyProfiling = false, no profiling data is collected (no silent fallback).ProfilingManager— transaction-based (legacy) profiling is unaffected.ProfilingManagerdoesn't support it).ProfilingManagerdoesn't includelinux.process_statsdata).💡 Motivation and Context
💚 How did you test it?
content_type: "perfetto"and inspected in Perfetto UI.📝 Checklist
sendDefaultPIIis enabled.