From 22be8304579ab1757b943706cba1d0bf69cd02f6 Mon Sep 17 00:00:00 2001 From: Andrea Marziali Date: Fri, 16 Dec 2022 17:02:20 +0100 Subject: [PATCH] use host header to fill undertow http tags --- .../undertow/HttpServerExchangeURIDataAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dd-java-agent/instrumentation/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/HttpServerExchangeURIDataAdapter.java b/dd-java-agent/instrumentation/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/HttpServerExchangeURIDataAdapter.java index 363e47a8804..a9dbc130978 100644 --- a/dd-java-agent/instrumentation/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/HttpServerExchangeURIDataAdapter.java +++ b/dd-java-agent/instrumentation/undertow-2.0/src/main/java/datadog/trace/instrumentation/undertow/HttpServerExchangeURIDataAdapter.java @@ -17,12 +17,12 @@ public String scheme() { @Override public String host() { - return httpServerExchange.getDestinationAddress().getHostName(); + return httpServerExchange.getHostName(); } @Override public int port() { - return httpServerExchange.getDestinationAddress().getPort(); + return httpServerExchange.getHostPort(); } @Override