Skip to content

Commit 3d33231

Browse files
committed
wip
1 parent d629917 commit 3d33231

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

1 file changed

+1
-22
lines changed

instrumentation/spring/spring-webmvc/spring-webmvc-common/testing/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/boot/AbstractSpringBootBasedTest.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.REDIRECT;
1919
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
2020
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies;
21-
import static io.opentelemetry.semconv.CodeAttributes.CODE_FUNCTION_NAME;
2221
import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_MESSAGE;
2322
import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_STACKTRACE;
2423
import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_TYPE;
@@ -49,7 +48,6 @@
4948
import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
5049
import org.springframework.web.servlet.view.RedirectView;
5150

52-
@SuppressWarnings("deprecation") // using deprecated semconv
5351
public 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

0 commit comments

Comments
 (0)