Requested by: @markushi
Merge target: (default)
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
Features
- Use Android's
ProfilingManager (Perfetto) for continuous profiling on API 35+ devices (#5251)
- On API 35+ devices, continuous profiling now automatically uses Android's system
ProfilingManager with Perfetto-based stack sampling, providing lower-overhead and more accurate profiles. No configuration change is required.
- Devices below API 35 keep using the legacy
Debug-based profiler.
- Added an
enableLegacyProfiling option (default true) to disable the legacy Debug-based profiler. Setting it to false disables continuous profiling on API < 35 devices as well as transaction-based profiling (profilesSampleRate/profilesSampler) on all devices, since transaction-based profiling is not supported by Perfetto.
- It can also be configured via the
io.sentry.profiling.enable-legacy-profiling manifest flag.
- See the Android profiling docs for details.
Behavioral Changes
- The outbox and cache directories are no longer created by
Sentry.init (#5792)
- They are now created lazily by whichever component first writes into them, off the init thread. As a result, the directories at
SentryOptions.getOutboxPath() and SentryOptions.getCacheDirPath() are not guaranteed to exist once Sentry.init returns.
- If you write envelopes into the outbox path yourself instead of going through the SDK — as hybrid SDKs do for
captureEnvelope — create the directory first, e.g. new File(outboxPath).mkdirs().
Improvements
- Skip building Android manifest metadata debug log messages when debug logging is disabled, reducing allocations during SDK init (#5790)
Fixes
- Use the original app build's ProGuard UUID for ANR profile chunks (#5852)
- Fix potential ANR/deadlock in Session Replay when
checkCanRecord runs on the replay executor thread (#5837)
- Prevent concurrent PixelCopy access during Session Replay masking and bitmap cleanup (#5808)
- Release
MediaMuxer when the replay video encoder fails to start to avoid a resource leak (#5607)
- Set the correct platform (
android instead of java) on ANR profile chunks so they are billed as UI Profile Hours rather than Continuous Profile Hours (#5836)
Performance
- Create the outbox and cache directories lazily in their consumers instead of during SDK init, moving the
mkdirs() calls off the init (main) thread (#5792)
- Reduce the number of SDK threads:
LifecycleWatcher now schedules the session-end task on the shared timer executor instead of creating a dedicated java.util.Timer thread (#5819)
- Reduce the number of SDK threads:
RateLimiter now schedules its rate-limit-lifted notifications on the shared timer executor instead of creating a dedicated java.util.Timer thread (#5814)
- Speed up deserialization of arbitrary JSON objects by typing numbers without throwing exceptions (#5783)
Dependencies
- Bump Native SDK from v0.15.4 to v0.16.0 (#5845)
Requested by: @markushi
Merge target: (default)
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
Features
ProfilingManager(Perfetto) for continuous profiling on API 35+ devices (#5251)ProfilingManagerwith Perfetto-based stack sampling, providing lower-overhead and more accurate profiles. No configuration change is required.Debug-based profiler.enableLegacyProfilingoption (defaulttrue) to disable the legacyDebug-based profiler. Setting it tofalsedisables continuous profiling on API < 35 devices as well as transaction-based profiling (profilesSampleRate/profilesSampler) on all devices, since transaction-based profiling is not supported by Perfetto.io.sentry.profiling.enable-legacy-profilingmanifest flag.Behavioral Changes
Sentry.init(#5792)SentryOptions.getOutboxPath()andSentryOptions.getCacheDirPath()are not guaranteed to exist onceSentry.initreturns.captureEnvelope— create the directory first, e.g.new File(outboxPath).mkdirs().Improvements
Fixes
checkCanRecordruns on the replay executor thread (#5837)MediaMuxerwhen the replay video encoder fails to start to avoid a resource leak (#5607)androidinstead ofjava) on ANR profile chunks so they are billed as UI Profile Hours rather than Continuous Profile Hours (#5836)Performance
mkdirs()calls off the init (main) thread (#5792)LifecycleWatchernow schedules the session-end task on the shared timer executor instead of creating a dedicatedjava.util.Timerthread (#5819)RateLimiternow schedules its rate-limit-lifted notifications on the shared timer executor instead of creating a dedicatedjava.util.Timerthread (#5814)Dependencies