You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "h0cheung (via GitHub)" <gi...@apache.org> on 2024/12/23 03:51:25 UTC
[I] [Feature] Use BEST_MATCHING_PATTERN_ATTRIBUTE instead of annotation based route for Spring MVC. [skywalking]
h0cheung opened a new issue, #12890:
URL: https://github.com/apache/skywalking/issues/12890
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
### 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.](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/spring/spring-webmvc/spring-webmvc-3.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/webmvc/v3_1/HandlerAdapterInstrumentation.java)
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a pull request to implement this on your own?
- [ ] Yes I am willing to submit a pull request on my own!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature] Use BEST_MATCHING_PATTERN_ATTRIBUTE instead of annotation based route for Spring MVC. [skywalking]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng closed issue #12890: [Feature] Use BEST_MATCHING_PATTERN_ATTRIBUTE instead of annotation based route for Spring MVC.
URL: https://github.com/apache/skywalking/issues/12890
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org