Skip to content

chore(deps): update Java SDK to v8.51.0 - #2790

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
deps/modules/sentry-java/8.51.0
Open

chore(deps): update Java SDK to v8.51.0#2790
github-actions[bot] wants to merge 1 commit into
mainfrom
deps/modules/sentry-java/8.51.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Bumps modules/sentry-java from 8.51.0-1-g057ba3685 to 8.51.0.

Auto-generated by a dependency updater.

Changelog

8.51.0

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)
  • Skip encoding and capturing buffered session replay segments while rate-limited, so we don't waste resources on envelopes the transport will drop (#5813)
    • These skipped replays are now reported as ratelimit_backoff discarded events in client reports, so they no longer disappear from drop statistics. One event is recorded per buffer flush rather than per segment.
    • Buffer mode is also kept while rate-limited instead of switching to session mode, so the rolling buffer stays warm and the next error after the rate limit expires can send a complete replay.

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

@bruno-garcia
bruno-garcia force-pushed the deps/modules/sentry-java/8.51.0 branch from 55b9c9d to aa4d255 Compare July 30, 2026 03:58
Comment thread modules/sentry-java
@@ -1 +1 @@
Subproject commit 23f7e5f9fb6d80bf28a56c7c1bf7d2bb3d4be1b0
Subproject commit b01b159cce519c2da9db6303c8e9b64cdefd7b51

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Android integration for sentry-unity does not create the outbox directory, which is no longer handled by the Java SDK's Sentry.init and could cause failures.
Severity: MEDIUM

Suggested Fix

Before initializing the Java SDK, check if the outbox path is set in the options. If it is, create the directory using new File(options.getOutboxPath()).mkdirs() to ensure it exists, as required by the updated Java SDK.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: modules/sentry-java#L1

Potential issue: The updated Java SDK v8.51.0 introduces a breaking change where it no
longer creates the outbox and cache directories during `Sentry.init`. The release notes
explicitly state that hybrid SDKs which write envelopes directly to the outbox path must
now create the directory first, for example by calling `new File(outboxPath).mkdirs()`.
The `sentry-unity` codebase does not contain any code to create these directories. While
current usage patterns may not write directly to the Java SDK's outbox, this omission
creates a potential failure point for any code path that does, or for future changes
that rely on this behavior.

Did we get this right? 👍 / 👎 to inform future reviews.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant