-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialogue DNS logging provides higher signal with less noise #2191
Conversation
Generate changelog in
|
@Unsafe | ||
@Nullable | ||
static String tryGetHost(@Unsafe String uriString) { | ||
try { | ||
URI uri = new URI(uriString); | ||
return uri.getHost(); | ||
} catch (URISyntaxException | RuntimeException e) { | ||
log.debug("Failed to parse URI", e); | ||
return null; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracted from a lambda in DialogueDnsResolutionWorker
to reuse within describeHostname
. There's a similar method in ReloadingClientFactory
which doesn't share this implementation because it's where we provide higher priority logging and metrics for invalid URIs -- we don't want to duplicate that N times for a single failure.
@@ -186,7 +186,7 @@ public <T> T getNonReloading(Class<T> clazz, ServiceConfiguration serviceConf) { | |||
Channel channel = new LiveReloadingChannel( | |||
DnsSupport.pollForChanges( | |||
params.dnsNodeDiscovery(), | |||
DnsPollingSpec.SERVICE_CONFIG, | |||
DnsPollingSpec.serviceConfig(channelName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated these so that we'll get more specific metric tags describing ongoing work, and used the info within the background DNS polling task failure logging so we don't have to guess about the unsafe URI.
Released 3.121.0 |
==COMMIT_MSG==
Dialogue DNS logging provides higher signal with less noise
==COMMIT_MSG==