Skip to content

Commit cab03e0

Browse files
richardstartintrask
authored andcommitted
Remove anonymous class from spring webmvc-3.1 (DataDog/dd-trace-java#1611)
1 parent d2e6c62 commit cab03e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

instrumentation/spring-webmvc-3.1/src/main/java/io/opentelemetry/auto/instrumentation/springwebmvc/SpringWebMvcDecorator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public Span onRender(final Span span, final ModelAndView mv) {
9696
span.setAttribute("view.name", mv.getViewName());
9797
final View view = mv.getView();
9898
if (view != null) {
99-
span.setAttribute("view.type", view.getClass().getName());
99+
span.setAttribute("view.type", spanNameForClass(view.getClass()));
100100
}
101101
return span;
102102
}

instrumentation/spring-webmvc-3.1/src/test/groovy/test/boot/SpringBootBasedTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class SpringBootBasedTest extends HttpServerTest<ConfigurableApplicationContext>
136136
spanKind INTERNAL
137137
errored false
138138
tags {
139-
"view.type" RedirectView.name
139+
"view.type" RedirectView.simpleName
140140
}
141141
}
142142
}

0 commit comments

Comments
 (0)