skywalking icon indicating copy to clipboard operation
skywalking copied to clipboard

There's a bit of doubt about the way springMVC gets the operationName

Open liu-junchi opened this issue 8 years ago • 4 comments

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • [x] Question or discussion
  • [ ] Bug
  • [ ] Requirement
  • [ ] Feature or performance improvement

Question

  • What do you want to know? Like this, image the RequestMappingMethodInterceptor#getRequestURL just get the RequestMapping annotation's path or value as operationName, I think maybe I need the parsed path as operationName.

liu-junchi avatar Jun 04 '18 03:06 liu-junchi

Yes. only use path pattern as the operation name, the backend will aggregate and analysis the metrics for the service(based on operation name).

wu-sheng avatar Jun 04 '18 03:06 wu-sheng

What's the difference, if the operationName use parsed path pattern~

liu-junchi avatar Jun 04 '18 03:06 liu-junchi

I guess parsed path pattern, you mean the real URL?

  • Pattern: ${spring.application.name}/access/page
  • URI: application-xxx/access/page

Right? If yes, try to think some one will put userid, accountid in the url, the patten looks like /prod/order/${orderid}. Then you can image what happens... Metrics will be useless..

wu-sheng avatar Jun 04 '18 03:06 wu-sheng

Thanks, I get it.

liu-junchi avatar Jun 04 '18 03:06 liu-junchi