diff --git a/dd-java-agent/instrumentation/dropwizard/src/test/groovy/DropwizardTest.groovy b/dd-java-agent/instrumentation/dropwizard/src/test/groovy/DropwizardTest.groovy index afd65a0870..6354ba45e0 100644 --- a/dd-java-agent/instrumentation/dropwizard/src/test/groovy/DropwizardTest.groovy +++ b/dd-java-agent/instrumentation/dropwizard/src/test/groovy/DropwizardTest.groovy @@ -113,7 +113,6 @@ class DropwizardTest extends HttpServerTest { tags { "$Tags.COMPONENT" serverDecorator.component() "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" { it == "localhost" || it == "127.0.0.1" } "$Tags.PEER_HOST_IPV4" { it == null || it == "127.0.0.1" } // Optional "$Tags.PEER_PORT" Integer "$Tags.HTTP_STATUS" endpoint.status diff --git a/dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy b/dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy index b4b0c7659a..065be47d25 100644 --- a/dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy +++ b/dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy @@ -4,15 +4,16 @@ import datadog.trace.api.DDSpanTypes import datadog.trace.api.DDTags import datadog.trace.bootstrap.instrumentation.api.Tags import datadog.trace.instrumentation.jetty8.JettyDecorator -import javax.servlet.DispatcherType -import javax.servlet.ServletException -import javax.servlet.http.HttpServletRequest -import javax.servlet.http.HttpServletResponse import org.eclipse.jetty.server.Request import org.eclipse.jetty.server.Server import org.eclipse.jetty.server.handler.AbstractHandler import org.eclipse.jetty.server.handler.ErrorHandler +import javax.servlet.DispatcherType +import javax.servlet.ServletException +import javax.servlet.http.HttpServletRequest +import javax.servlet.http.HttpServletResponse + import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.ERROR import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.EXCEPTION import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.NOT_FOUND @@ -131,7 +132,6 @@ class JettyHandlerTest extends HttpServerTest { tags { "$Tags.COMPONENT" serverDecorator.component() "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" { it == "localhost" || it == "127.0.0.1" } "$Tags.PEER_HOST_IPV4" { it == null || it == "127.0.0.1" } // Optional "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "${endpoint.resolve(address)}" diff --git a/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy b/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy index 6a9cd9fe2f..82d3ee5cd3 100644 --- a/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy +++ b/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy @@ -96,7 +96,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/$jspFileName" @@ -172,7 +171,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/getQuery.jsp" @@ -245,7 +243,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/post.jsp" @@ -315,7 +312,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/$jspFileName" @@ -406,7 +402,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/includes/includeHtml.jsp" @@ -475,7 +470,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/includes/includeMulti.jsp" @@ -600,7 +594,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/$jspFileName" @@ -664,7 +657,6 @@ class JSPInstrumentationBasicTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/$staticFile" diff --git a/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy b/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy index 5a9a0d971d..6bee485037 100644 --- a/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy +++ b/dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy @@ -95,7 +95,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/$forwardFromFileName" @@ -198,7 +197,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/forwards/forwardToHtml.jsp" @@ -267,7 +265,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/forwards/forwardToIncludeMulti.jsp" @@ -423,7 +420,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/forwards/forwardToJspForward.jsp" @@ -550,7 +546,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/forwards/forwardToCompileError.jsp" @@ -636,7 +631,6 @@ class JSPInstrumentationForwardTests extends AgentTestRunner { tags { "$Tags.COMPONENT" "java-web-servlet" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "127.0.0.1" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "http://localhost:$port/$jspWebappContext/forwards/forwardToNonExistent.jsp" diff --git a/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackOtherTest.groovy b/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackOtherTest.groovy index feeb7a67fe..50b28a1d3a 100644 --- a/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackOtherTest.groovy +++ b/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/RatpackOtherTest.groovy @@ -72,7 +72,6 @@ class RatpackOtherTest extends AgentTestRunner { tags { "$Tags.COMPONENT" "netty" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "$app.address.host" "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "${app.address.resolve(path)}" @@ -91,7 +90,7 @@ class RatpackOtherTest extends AgentTestRunner { tags { "$Tags.COMPONENT" "ratpack" "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "$app.address.host" + "$Tags.PEER_HOST_IPV4" "127.0.0.1" "$Tags.PEER_PORT" Integer "$Tags.HTTP_URL" "${app.address.resolve(path)}" "$Tags.HTTP_METHOD" "GET" diff --git a/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/server/RatpackHttpServerTest.groovy b/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/server/RatpackHttpServerTest.groovy index 82bb20ffcb..3354619b32 100644 --- a/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/server/RatpackHttpServerTest.groovy +++ b/dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/server/RatpackHttpServerTest.groovy @@ -117,7 +117,6 @@ class RatpackHttpServerTest extends HttpServerTest { tags { "$Tags.COMPONENT" serverDecorator.component() "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" "localhost" "$Tags.PEER_HOST_IPV4" "127.0.0.1" // No peer port "$Tags.HTTP_URL" "${endpoint.resolve(address)}" diff --git a/dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/AbstractServlet3Test.groovy b/dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/AbstractServlet3Test.groovy index c507ecc424..7b152e39e6 100644 --- a/dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/AbstractServlet3Test.groovy +++ b/dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/AbstractServlet3Test.groovy @@ -4,10 +4,11 @@ import datadog.trace.api.DDSpanTypes import datadog.trace.api.DDTags import datadog.trace.bootstrap.instrumentation.api.Tags import datadog.trace.instrumentation.servlet3.Servlet3Decorator -import javax.servlet.Servlet import okhttp3.Request import org.apache.catalina.core.ApplicationFilterChain +import javax.servlet.Servlet + import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.AUTH_REQUIRED import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.ERROR import static datadog.trace.agent.test.base.HttpServerTest.ServerEndpoint.EXCEPTION @@ -86,7 +87,6 @@ abstract class AbstractServlet3Test extends HttpServerTest ext tags { "$Tags.COMPONENT" serverDecorator.component() "$Tags.SPAN_KIND" Tags.SPAN_KIND_SERVER - "$Tags.PEER_HOSTNAME" { it == "localhost" || it == "127.0.0.1" } "$Tags.PEER_PORT" Integer "$Tags.PEER_HOST_IPV4" { it == null || it == "127.0.0.1" } // Optional "$Tags.HTTP_URL" "${endpoint.resolve(address)}"