From eb301c81932037f3a934aa674f0384197656b03b Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko Date: Wed, 31 Jan 2024 18:34:11 +0100 Subject: [PATCH] Fix port used for APM track spans submission --- .../jenkins/plugins/datadog/clients/DatadogAgentClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/datadog/jenkins/plugins/datadog/clients/DatadogAgentClient.java b/src/main/java/org/datadog/jenkins/plugins/datadog/clients/DatadogAgentClient.java index cf0562ae..4b952677 100644 --- a/src/main/java/org/datadog/jenkins/plugins/datadog/clients/DatadogAgentClient.java +++ b/src/main/java/org/datadog/jenkins/plugins/datadog/clients/DatadogAgentClient.java @@ -586,7 +586,7 @@ private void sendSpansToApm(Collection spans) { } byte[] payload = jsonTraces.toString().getBytes(StandardCharsets.UTF_8); - String tracesUrl = String.format("http://%s:%d/v0.3/traces", hostname, port); + String tracesUrl = String.format("http://%s:%d/v0.3/traces", hostname, traceCollectionPort); client.put(tracesUrl, Collections.emptyMap(), "application/json", payload, Function.identity()); } catch (InterruptedException e) {