Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,7 @@ private boolean processInfoResponse(State newState, String response) {
}
}

if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V1)) {
newState.debuggerLogEndpoint = DEBUGGER_ENDPOINT_V1;
}
// both debugger v2 and diagnostics endpoints are forwarding events to the DEBUGGER intake
// because older agents support diagnostics from DD agent 7.49
if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V2)) {
newState.debuggerSnapshotEndpoint = DEBUGGER_ENDPOINT_V2;
} else if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
newState.debuggerSnapshotEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
}
if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
newState.debuggerDiagnosticsEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
}
setDebuggerEndpoints(newState, endpoints);

for (String endpoint : dataStreamsEndpoints) {
if (containsEndpoint(endpoints, endpoint)) {
Expand Down Expand Up @@ -335,6 +323,26 @@ private boolean processInfoResponse(State newState, String response) {
return false;
}

private static void setDebuggerEndpoints(State newState, Set<String> endpoints) {
// both debugger v2 and diagnostics endpoints are forwarding events to the DEBUGGER intake
// because older agents support diagnostics from DD agent 7.49
if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V2)) {
newState.debuggerLogEndpoint = DEBUGGER_ENDPOINT_V2;
} else if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
newState.debuggerLogEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
} else if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V1)) {
newState.debuggerLogEndpoint = DEBUGGER_ENDPOINT_V1;
}
if (containsEndpoint(endpoints, DEBUGGER_ENDPOINT_V2)) {
newState.debuggerSnapshotEndpoint = DEBUGGER_ENDPOINT_V2;
} else if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
newState.debuggerSnapshotEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
}
if (containsEndpoint(endpoints, DEBUGGER_DIAGNOSTICS_ENDPOINT)) {
newState.debuggerDiagnosticsEndpoint = DEBUGGER_DIAGNOSTICS_ENDPOINT;
}
}

private static boolean containsEndpoint(Set<String> endpoints, String endpoint) {
return endpoints.contains(endpoint) || endpoints.contains("/" + endpoint);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void testEndpoints() throws Exception {
}
if (line.contains("Started BatchUploader[Logs]")) {
return !line.matches(
".* Started BatchUploader\\[Logs] with target url http://localhost:\\d+/debugger/v1/input");
".* Started BatchUploader\\[Logs] with target url http://localhost:\\d+/debugger/v1/diagnostics");
}
if (line.contains("Started BatchUploader[SymDB]")) {
return !line.matches(
Expand Down
Loading