Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apm-customize-enhance-plugin can not be use on spring Controller? #3793

Closed
2 of 4 tasks
liangxp opened this issue Nov 6, 2019 · 5 comments
Closed
2 of 4 tasks

apm-customize-enhance-plugin can not be use on spring Controller? #3793

liangxp opened this issue Nov 6, 2019 · 5 comments
Labels
question End user question and discussion.
Milestone

Comments

@liangxp
Copy link

liangxp commented Nov 6, 2019

Please answer these questions before submitting your issue.

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

Question

  • apm-customize-enhance-plugin can not be use on spring Controller?

Bug

  • Which version of SkyWalking, OS and JRE?

  • Which company or project?

  • What happen?
    If possible, provide a way for reproducing the error. e.g. demo application, component version.


Requirement or improvement

package com.example.demo.controller; @RestController public class TestController { @GetMapping("/") public String test(String p){ ActiveSpan.tag("orderId", UUID.randomUUID().toString()); ActiveSpan.info("日志信息"); return p; } }
customize_enhance.xml :

<?xml version="1.0" encoding="UTF-8"?> <enhanced> <class class_name="ccom.example.demo.controller.TestController"> <method method="test(java.lang.String)" static="false"> <tag key="tagTest">arg[0]</tag> <log key="log_1">arg[0]</log> </method> </class> </enhanced>

@wu-sheng wu-sheng added this to the 6.5.0 milestone Nov 6, 2019
@wu-sheng wu-sheng added the question End user question and discussion. label Nov 6, 2019
@wu-sheng
Copy link
Member

wu-sheng commented Nov 6, 2019

Your example includes two cs in class_name="ccom.example.demo.controller.TestController". Are you sure you set it right?

@wu-sheng wu-sheng closed this as completed Nov 6, 2019
@liangxp
Copy link
Author

liangxp commented Nov 7, 2019

@wu-sheng sorry,in my project I used class_name="com.example.demo.controller.TestController".spring boot version is 2.2.0.RELEASE

@wu-sheng
Copy link
Member

wu-sheng commented Nov 7, 2019

Then I will suggest you do debug. You will know whether this class has been enhanced twice.

@liangxp
Copy link
Author

liangxp commented Nov 7, 2019

If it's not designed like this, I'll try to debug and find the problem

@wu-sheng
Copy link
Member

wu-sheng commented Nov 7, 2019

If it's not designed like this, I'll try to debug and find the problem

It should work. But I am not sure about the real case. This is not the design, but you can invest why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question End user question and discussion.
Projects
None yet
Development

No branches or pull requests

2 participants