Skip to content

Commit f2c2b6b

Browse files
runningcodeclaude
andcommitted
docs(core): Point HostnameCache callers at SentryOptions
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent b2f9813 commit f2c2b6b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎sentry/src/main/java/io/sentry/HostnameCache.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public final class HostnameCache {
5454

5555
private final @NotNull ExecutorService executorService;
5656

57+
/**
58+
* Do not construct a hostname cache directly; get it from {@link
59+
* SentryOptions#getHostnameCache()}. Every instance resolves the hostname as soon as it is built
60+
* and caches it on its own, so another instance would repeat that blocking lookup instead of
61+
* sharing the cached value.
62+
*/
5763
HostnameCache() {
5864
this(HOSTNAME_CACHE_DURATION);
5965
}

0 commit comments

Comments
 (0)