Skip to content

Update v9 branch - #6287

Merged
sentry-junior[bot] merged 6 commits into
9.x.xfrom
main
Oct 20, 2026
Merged

sentry-junior[bot] merged 6 commits into
9.x.xfrom
main

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Weekly automated sync of main into 9.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]

runningcode and others added 6 commits October 15, 2026 14:45
…-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

sentry Bot commented Oct 20, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.61.0 (1) release

⚙️ sentry-android Build Distribution Settings

@sentry-junior
sentry-junior Bot merged commit 828c64a into 9.x.x Oct 20, 2026
126 of 128 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant