Add servlet.path tag
This commit is contained in:
parent
fecaa8d084
commit
fdf2241e5f
|
@ -101,6 +101,7 @@ class GlassFishServerTest extends HttpServerTest<GlassFish, Servlet3Decorator> {
|
|||
}
|
||||
tags {
|
||||
"servlet.context" "/$context"
|
||||
"servlet.path" endpoint.path
|
||||
"span.origin.type" { it.startsWith("TestServlets\$") || it == DefaultServlet.name }
|
||||
|
||||
defaultTags(true)
|
||||
|
|
|
@ -56,6 +56,7 @@ public class JettyDecorator
|
|||
assert span != null;
|
||||
if (request != null) {
|
||||
span.setTag("servlet.context", request.getContextPath());
|
||||
span.setTag("servlet.path", request.getServletPath());
|
||||
}
|
||||
return super.onRequest(span, request);
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/$jspFileName"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -177,6 +178,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/getQuery.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -249,6 +251,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/post.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -318,6 +321,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/$jspFileName"
|
||||
"http.status_code" 500
|
||||
"error" true
|
||||
"error.type" { String tagExceptionType ->
|
||||
|
@ -408,6 +412,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/includes/includeHtml.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -476,6 +481,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/includes/includeMulti.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -600,6 +606,7 @@ class JSPInstrumentationBasicTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/$jspFileName"
|
||||
"http.status_code" 500
|
||||
errorTags(JasperException, String)
|
||||
defaultTags()
|
||||
|
|
|
@ -101,6 +101,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/$forwardFromFileName"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -203,6 +204,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/forwards/forwardToHtml.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -271,6 +273,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/forwards/forwardToIncludeMulti.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -426,6 +429,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/forwards/forwardToJspForward.jsp"
|
||||
"http.status_code" 200
|
||||
defaultTags()
|
||||
}
|
||||
|
@ -552,6 +556,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/forwards/forwardToCompileError.jsp"
|
||||
"http.status_code" 500
|
||||
errorTags(JasperException, String)
|
||||
defaultTags()
|
||||
|
@ -637,6 +642,7 @@ class JSPInstrumentationForwardTests extends AgentTestRunner {
|
|||
"component" "java-web-servlet"
|
||||
"span.origin.type" "org.apache.catalina.core.ApplicationFilterChain"
|
||||
"servlet.context" "/$jspWebappContext"
|
||||
"servlet.path" "/forwards/forwardToNonExistent.jsp"
|
||||
"http.status_code" 404
|
||||
defaultTags()
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ public class Servlet2Decorator
|
|||
assert span != null;
|
||||
if (request != null) {
|
||||
span.setTag("servlet.context", request.getContextPath());
|
||||
span.setTag("servlet.path", request.getServletPath());
|
||||
}
|
||||
return super.onRequest(span, request);
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class Servlet3Decorator
|
|||
assert span != null;
|
||||
if (request != null) {
|
||||
span.setTag("servlet.context", request.getContextPath());
|
||||
span.setTag("servlet.path", request.getServletPath());
|
||||
}
|
||||
return super.onRequest(span, request);
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ abstract class AbstractServlet3Test<SERVER, CONTEXT> extends HttpServerTest<SERV
|
|||
}
|
||||
tags {
|
||||
"servlet.context" "/$context"
|
||||
"servlet.path" endpoint.path
|
||||
"span.origin.type" { it == servlet.name || it == ApplicationFilterChain.name }
|
||||
|
||||
defaultTags(true)
|
||||
|
|
|
@ -126,6 +126,7 @@ class SpringBootBasedTest extends HttpServerTest<ConfigurableApplicationContext,
|
|||
}
|
||||
tags {
|
||||
"span.origin.type" ApplicationFilterChain.name
|
||||
"servlet.path" endpoint.path
|
||||
|
||||
defaultTags(true)
|
||||
"$Tags.COMPONENT" serverDecorator.component()
|
||||
|
|
Loading…
Reference in New Issue