You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fbec6c7
Browse filesBrowse the repository at this point in the historyBrowse files
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>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
### Internal
23
23
24
24
- Hold the hostname cache on `SentryOptions` instead of a static singleton ([#6117](https://github.com/getsentry/sentry-java/pull/6117))
25
+
- Measure the hostname cache TTL on the monotonic ticker the options provide, so that a device time change no longer shortens or extends it ([#6100](https://github.com/getsentry/sentry-java/pull/6100))
0 commit comments