Skip to content

Commit 7145fa8

Browse files
committed
Fix debugger batch upload URL when using UDS
1 parent 54461ee commit 7145fa8

File tree

1 file changed

+9
-6
lines changed
  • internal-api/src/main/java/datadog/trace/api

1 file changed

+9
-6
lines changed

internal-api/src/main/java/datadog/trace/api/Config.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,18 +3326,21 @@ public Set<String> getThirdPartyExcludes() {
33263326
return debuggerThirdPartyExcludes;
33273327
}
33283328

3329-
public String getFinalDebuggerProbeUrl() {
3330-
// by default poll from datadog agent
3331-
return "http://" + agentHost + ":" + agentPort;
3329+
private String getFinalDebuggerBaseUrl() {
3330+
if (agentUrl.startsWith("unix:")) {
3331+
// provide placeholder agent URL, in practice we'll be tunnelling over UDS
3332+
return "http://" + agentHost + ":" + agentPort;
3333+
} else {
3334+
return agentUrl;
3335+
}
33323336
}
33333337

33343338
public String getFinalDebuggerSnapshotUrl() {
3335-
// by default send to datadog agent
3336-
return agentUrl + "/debugger/v1/input";
3339+
return getFinalDebuggerBaseUrl() + "/debugger/v1/input";
33373340
}
33383341

33393342
public String getFinalDebuggerSymDBUrl() {
3340-
return agentUrl + "/symdb/v1/input";
3343+
return getFinalDebuggerBaseUrl() + "/symdb/v1/input";
33413344
}
33423345

33433346
public String getDebuggerProbeFileLocation() {

0 commit comments

Comments
 (0)