File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
instrumentation/servlet/servlet-2.2/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/servlet/v2_2 Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1616import static io .opentelemetry .instrumentation .testing .junit .http .ServerEndpoint .REDIRECT ;
1717import static io .opentelemetry .instrumentation .testing .junit .http .ServerEndpoint .SUCCESS ;
1818import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .equalTo ;
19- import static io .opentelemetry .semconv .incubating .CodeIncubatingAttributes .CODE_FUNCTION ;
20- import static io .opentelemetry .semconv .incubating .CodeIncubatingAttributes .CODE_NAMESPACE ;
19+ import static io .opentelemetry .semconv .incubating .CodeIncubatingAttributes .CODE_FUNCTION_NAME ;
2120
2221import io .opentelemetry .instrumentation .api .internal .HttpConstants ;
2322import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
@@ -111,15 +110,13 @@ public String expectedServerSpanName(
111110 }
112111 }
113112
114- @ SuppressWarnings ("deprecation" ) // using deprecated semconv
115113 @ Override
116114 protected SpanDataAssert assertResponseSpan (
117115 SpanDataAssert span , String method , ServerEndpoint endpoint ) {
118116 String responseMethod = endpoint .equals (REDIRECT ) ? "sendRedirect" : "sendError" ;
119117 return span .hasName ("Response." + responseMethod )
120118 .hasKind (INTERNAL )
121119 .hasAttributesSatisfyingExactly (
122- equalTo (CODE_NAMESPACE , Response .class .getName ()),
123- equalTo (CODE_FUNCTION , responseMethod ));
120+ equalTo (CODE_FUNCTION_NAME , Response .class .getName () + "." + responseMethod ));
124121 }
125122}
You can’t perform that action at this time.
0 commit comments