Skip to content

Commit 12bbb14

Browse files
committed
Fix debugger batch upload URL when using UDS (#7166)
1 parent 28dfa70 commit 12bbb14

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
@@ -3323,18 +3323,21 @@ public Set<String> getThirdPartyExcludes() {
33233323
return debuggerThirdPartyExcludes;
33243324
}
33253325

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

33313335
public String getFinalDebuggerSnapshotUrl() {
3332-
// by default send to datadog agent
3333-
return agentUrl + "/debugger/v1/input";
3336+
return getFinalDebuggerBaseUrl() + "/debugger/v1/input";
33343337
}
33353338

33363339
public String getFinalDebuggerSymDBUrl() {
3337-
return agentUrl + "/symdb/v1/input";
3340+
return getFinalDebuggerBaseUrl() + "/symdb/v1/input";
33383341
}
33393342

33403343
public String getDebuggerProbeFileLocation() {

0 commit comments

Comments
 (0)