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 b2f9813
Browse filesBrowse the repository at this point in the historyBrowse files
ref(core): Hold the hostname cache on SentryOptions (JAVA-579)
HostnameCache was a process-wide static singleton. SentryOptions now holds
one instance instead, wrapped in a LazyEvaluator because resolving the
hostname blocks on InetAddress.getLocalHost(), which no Sentry.init should
pay for up front.
MainEventProcessor, MetricsApi and LoggerApi read the cache off the options
they already hold. MainEventProcessor no longer memoizes the cache itself,
since that duplicated the LazyEvaluator.
MainEventProcessorTest no longer needs Mockito.mockStatic to intercept
getInstance(); it overrides getHostnameCache() on the options instead, the
way CheckInUtilsTest overrides getMonotonicTicker().
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0 commit comments