Replies: 1 comment
-
Hi, this method may be better, but note, this will only be helpful for the multiple routes case. If you want to change codes for that, we will review it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Search before asking
Description
As for now, skywalking-java gets route by parsing annotations, which won't work well when a method or controller class has multiple routes. In this case, the first route in the annotation will always be used.
Spring will set BEST_MATCHING_PATTERN_ATTRIBUTE after the handler has been matched, which can be used to set the operationName.
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter#handle
is a good entry point to get the attribute. It's also used by the spring mvc plugin of OpenTelemetry.Use case
No response
Related issues
No response
Are you willing to submit a pull request to implement this on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions