Make sure traceUrl is null before detecting agent url
This commit is contained in:
parent
e044567617
commit
f0a11d4aff
|
@ -291,12 +291,14 @@ public class DDAgentApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void detectEndpoint() {
|
private synchronized void detectEndpoint() {
|
||||||
final HttpUrl v4Url = getUrl(host, port, TRACES_ENDPOINT_V4);
|
if (tracesUrl == null) {
|
||||||
if (endpointAvailable(v4Url, unixDomainSocketPath, true)) {
|
final HttpUrl v4Url = getUrl(host, port, TRACES_ENDPOINT_V4);
|
||||||
tracesUrl = v4Url;
|
if (endpointAvailable(v4Url, unixDomainSocketPath, true)) {
|
||||||
} else {
|
tracesUrl = v4Url;
|
||||||
log.debug("API v0.4 endpoints not available. Downgrading to v0.3");
|
} else {
|
||||||
tracesUrl = getUrl(host, port, TRACES_ENDPOINT_V3);
|
log.debug("API v0.4 endpoints not available. Downgrading to v0.3");
|
||||||
|
tracesUrl = getUrl(host, port, TRACES_ENDPOINT_V3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue