Remove anonymous class from spring webmvc-3.1 (DataDog/dd-trace-java#1611)
MODIFY
instrumentation/spring-webmvc-3.1/src/main/java/io/opentelemetry/auto/instrumentation/springwebmvc/SpringWebMvcDecorator.java
instrumentation/spring-webmvc-3.1/src/main/java/io/opentelemetry/auto/instrumentation/springwebmvc/SpringWebMvcDecorator.java
@@ -96,7 +96,7 @@ public class SpringWebMvcDecorator extends BaseDecorator {
span.setAttribute("view.name", mv.getViewName());
final View view = mv.getView();
if (view != null) {
- span.setAttribute("view.type", view.getClass().getName());
+ span.setAttribute("view.type", spanNameForClass(view.getClass()));
}
return span;
}

MODIFY
instrumentation/spring-webmvc-3.1/src/test/groovy/test/boot/SpringBootBasedTest.groovy
instrumentation/spring-webmvc-3.1/src/test/groovy/test/boot/SpringBootBasedTest.groovy
@@ -136,7 +136,7 @@ class SpringBootBasedTest extends HttpServerTest<ConfigurableApplicationContext>
spanKind INTERNAL
errored false
tags {
- "view.type" RedirectView.name
+ "view.type" RedirectView.simpleName
}
}
}

Remove anonymous class from spring webmvc-3.1 (DataDog/dd-trace-java#1611)