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