Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public Class<?> getCodeClass(Object handler) {
@Nullable
@Override
public String getMethodName(Object handler) {
if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
return handlerMethod.getMethod().getName();
}
Comment on lines +28 to +31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return "handle";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ void basicGetTest(Parameter parameter) {
span.hasKind(SpanKind.INTERNAL)
.hasParent(trace.getSpan(0))
.hasAttributesSatisfyingExactly(
equalTo(CODE_FUNCTION, "handle"),
satisfies(
CODE_FUNCTION,
parameter.annotatedMethod == null
? val -> val.isEqualTo("handle")
: val -> val.isEqualTo(parameter.annotatedMethod)),
satisfies(
CODE_NAMESPACE,
parameter.annotatedMethod == null
Expand Down Expand Up @@ -259,7 +263,11 @@ void getAsyncResponseTest(Parameter parameter) {
span.hasKind(SpanKind.INTERNAL)
.hasParent(trace.getSpan(0))
.hasAttributesSatisfyingExactly(
equalTo(CODE_FUNCTION, "handle"),
satisfies(
CODE_FUNCTION,
parameter.annotatedMethod == null
? val -> val.isEqualTo("handle")
: val -> val.isEqualTo(parameter.annotatedMethod)),
satisfies(
CODE_NAMESPACE,
parameter.annotatedMethod == null
Expand Down Expand Up @@ -366,7 +374,11 @@ void createSpanDuringHandlerFunctionTest(Parameter parameter) {
span.hasKind(SpanKind.INTERNAL)
.hasParent(trace.getSpan(0))
.hasAttributesSatisfyingExactly(
equalTo(CODE_FUNCTION, "handle"),
satisfies(
CODE_FUNCTION,
parameter.annotatedMethod == null
? val -> val.isEqualTo("handle")
: val -> val.isEqualTo(parameter.annotatedMethod)),
satisfies(
CODE_NAMESPACE,
parameter.annotatedMethod == null
Expand Down Expand Up @@ -548,7 +560,11 @@ void getToBadEndpointTest(Parameter parameter) {
EXCEPTION_STACKTRACE,
val -> val.isInstanceOf(String.class))))
.hasAttributesSatisfyingExactly(
equalTo(CODE_FUNCTION, "handle"),
satisfies(
CODE_FUNCTION,
parameter.annotatedMethod == null
? val -> val.isEqualTo("handle")
: val -> val.isEqualTo(parameter.annotatedMethod)),
satisfies(
CODE_NAMESPACE,
parameter.annotatedMethod == null
Expand Down Expand Up @@ -695,7 +711,11 @@ void multipleGetsToDelayingRoute(Parameter parameter) {
span.hasKind(SpanKind.INTERNAL)
.hasParent(trace.getSpan(0))
.hasAttributesSatisfyingExactly(
equalTo(CODE_FUNCTION, "handle"),
satisfies(
CODE_FUNCTION,
parameter.annotatedMethod == null
? val -> val.isEqualTo("handle")
: val -> val.isEqualTo(parameter.annotatedMethod)),
satisfies(
CODE_NAMESPACE,
parameter.annotatedMethod == null
Expand Down