File tree Expand file tree Collapse file tree 1 file changed +1
-22
lines changed
instrumentation/spring/spring-webmvc/spring-webmvc-common/testing/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/boot Expand file tree Collapse file tree 1 file changed +1
-22
lines changed Original file line number Diff line number Diff line change 1818import static io .opentelemetry .instrumentation .testing .junit .http .ServerEndpoint .REDIRECT ;
1919import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .equalTo ;
2020import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .satisfies ;
21- import static io .opentelemetry .semconv .CodeAttributes .CODE_FUNCTION_NAME ;
2221import static io .opentelemetry .semconv .ExceptionAttributes .EXCEPTION_MESSAGE ;
2322import static io .opentelemetry .semconv .ExceptionAttributes .EXCEPTION_STACKTRACE ;
2423import static io .opentelemetry .semconv .ExceptionAttributes .EXCEPTION_TYPE ;
4948import org .springframework .web .servlet .resource .ResourceHttpRequestHandler ;
5049import org .springframework .web .servlet .view .RedirectView ;
5150
52- @ SuppressWarnings ("deprecation" ) // using deprecated semconv
5351public abstract class AbstractSpringBootBasedTest
5452 extends AbstractHttpServerTest <ConfigurableApplicationContext > {
5553
@@ -168,26 +166,7 @@ protected SpanDataAssert assertResponseSpan(
168166
169167 span .hasKind (SpanKind .INTERNAL )
170168 .hasAttributesSatisfyingExactly (
171- satisfies (
172- CODE_FUNCTION_NAME ,
173- val ->
174- val .satisfiesAnyOf (
175- v ->
176- assertThat (v )
177- .isEqualTo (
178- OnCommittedResponseWrapper .class .getName () + "." + methodName ),
179- v ->
180- assertThat (v )
181- .isEqualTo (
182- "org.springframework.security.web.firewall.FirewalledResponse"
183- + "."
184- + methodName ),
185- v ->
186- assertThat (v )
187- .isEqualTo (
188- "jakarta.servlet.http.HttpServletResponseWrapper"
189- + "."
190- + methodName ))));
169+ codeFunctionAssertions (OnCommittedResponseWrapper .class , methodName ));
191170 return span ;
192171 }
193172
You can’t perform that action at this time.
0 commit comments