Repository navigation
Update v9 branch - #6287
Merged
Merged
Update v9 branch#6287
Conversation
…-579) (#6100) * ref(core): Measure the hostname cache TTL on a monotonic ticker (JAVA-579) HostnameCache stored an absolute expiry built from System.currentTimeMillis() and compared it against a fresh reading of the same clock, so a device time change resized the 5 hour TTL: a backward step extended it, a forward step expired the cache early. It is now a Deadline on a MonotonicTicker. The ticker comes from SentryOptions.getMonotonicTicker(), the same way RateLimiter takes it, so on Android the TTL also counts time spent in deep sleep. The cache names the ticker as its only collaborator rather than taking the whole options. The LazyEvaluator that holds the cache defers reading the ticker until after SentryAndroidOptions has overridden it. The expiry no longer starts at 0: on a boot-relative ticker 0 is a real and very recent instant, so it would read as freshly set rather than unset. It starts as Deadline.passed(ticker) instead. The TTL is not a serialized value, so this is not gated behind v9. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(core): Drop an inaccurate reason for the lazy hostname cache A superclass field initializer already dispatches to the subclass override of getMonotonicTicker(), and SentryAndroidOptions returns a static singleton, so building the cache eagerly would read the right ticker too. The blocking hostname lookup is the only reason it is lazy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(core): Drop the collaborator note from the HostnameCache constructor Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ref(core): Mark the injectable HostnameCache constructor as visible for testing Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rst (#6270) * build: Resolve build-logic and buildSrc plugins from Maven Central first Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io> * build: Fail on project repos in build-logic and buildSrc Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Bumps the github-actions group with 1 update: [actions/create-github-app-token](https://github.com/actions/create-github-app-token). Updates `actions/create-github-app-token` from 3.2.0 to 3.3.0 - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md) - [Commits](actions/create-github-app-token@bcd2ba4...64ab729) --- updated-dependencies: - dependency-name: actions/create-github-app-token dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
…75) (#6090) * fix(replay): Measure recording deadlines on a monotonic clock (JAVA-575) Session Replay derives every interval from the wall clock. Two of those intervals are pure control flow, and a clock step corrupts both: - The 1h `sessionDuration` cap was `frameTimestamp - replayStartTimestamp`. A forward step past the cap kills a healthy recording on the next frame; a backward step lets one run indefinitely. - The 50ms ACTION_MOVE debounce was `lastCapturedMoveEvent + 50 > now`. A backward step suppresses every move event until the wall clock catches back up. Both now use `io.sentry.time.Deadline` on the options' `MonotonicTicker`, which is `SystemClock.elapsedRealtimeNanos()` on Android. That clock advances across device suspend just as the wall clock does, so the conversion preserves today's semantics and only removes the step. The cap is still evaluated when a frame is captured rather than when its queued task runs, so a busy replay executor cannot trip it. Everything else JAVA-575 lists — segment timestamps and durations, frame filenames, buffer cutoffs, gesture `timeOffset`s — stays on the wall clock: those values are serialized, and fixing them means re-basing them onto an `AnchoredClock`, which is a v9 change. `// TODO [MAJOR]` markers record that at both `ICurrentDateProvider` injection sites. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * changelog * ref(replay): Trim the v9 AnchoredClock TODOs Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(replay): Advance the ticker during the executor delay The executor-delay test only moved the wall clock while the frame task was queued, so it no longer guarded the 1h cap once that cap moved onto the monotonic ticker: checking the deadline inside the task would still pass. Advancing the ticker as well makes it fail on that regression. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ref(replay): Suppress detekt size checks on the capture strategies The monotonic ticker brings the capture-strategy constructors to seven parameters now that main injects a persisting executor, and the executor-delay ticker advance tips SessionCaptureStrategyTest over the LargeClass threshold. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(android): Trust bundled Sentry root CAs on API 25 and lower Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * changelog Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * ref(android): Only bundle ISRG Root X1 Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * ref(android): Add TODO for GTS roots before 2028 cross-sign expiry Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * ref(android): Address review feedback on bundled root CA - Mark SentryRootCaSslSocketFactory and SentryRootCertificates as @ApiStatus.Internal - Use StandardCharsets.UTF_8 instead of suppressing CharsetObjectCanBeUsed (minSdk 21) - Import Certificate in the test - Rewrite the changelog entry and link the TLS CA change announcement Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * docs(changelog): Mention Android 7.1.0 (API 25) as affected Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * fix(android): Only use bundled root CA for Sentry SaaS DSNs On API 24-25 the custom SSLSocketFactory reads the system CAs from the Network Security Config's base config, so domain-config trust anchors (for example a private CA for a self-hosted Sentry) would no longer apply to SDK uploads. Only install the factory when the DSN host is sentry.io or a subdomain, which is the only case that needs the bundled ISRG Root X1. Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * fix(android): Harden bundled root CA fallback and tests - Catch Throwable when building the delegate SSLSocketFactory, so a RuntimeException from OEM trust store code falls back to the default factory once instead of failing every upload without retry - Use @VisibleForTesting instead of @testonly on createTrustStore - Read the DSN host with a shared DsnUtil.getHost helper that parses it like Dsn does, without creating a URI - Test a real Let's Encrypt chain with PKIX: it fails without ISRG roots and validates with the bundled root - Remove ISRG roots from the JVM's system CAs in tests, so they prove the bundled root is added Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * ref(android): Catch Exception instead of Throwable when building the delegate Errors such as OutOfMemoryError are no longer swallowed, as AGENTS.md requires. RuntimeExceptions from OEM trust store code still fall back to the default SSLSocketFactory. Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * test(android): Drop OutOfMemoryError test Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> * changelog Co-Authored-By: roman <roman.zavarnitsyn@sentry.io> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: roman <roman.zavarnitsyn@sentry.io> Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
sentry-junior
Bot
requested review from
0xadam-brown,
adinauer,
markushi,
romtsn and
runningcode
as code owners
October 20, 2026 07:31
📲 Install BuildsAndroid
|
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.
Weekly automated sync of
maininto9.x.x.This brings in 6 commits from
main.Please review, then merge with a merge commit (do not squash).
via Junior system actor
scheduler.--
View Junior Session [Sentry]