You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/11/06 08:08:58 UTC

[GitHub] [skywalking] liangxp opened a new issue #3793: apm-customize-enhance-plugin can not be use on spring Controller?

liangxp opened a new issue #3793: apm-customize-enhance-plugin can not be use on spring Controller?
URL: https://github.com/apache/skywalking/issues/3793
 
 
   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [x] Question or discussion
   - [x] 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;
   
   import com.example.demo.service.TestService;
   import org.apache.skywalking.apm.toolkit.trace.ActiveSpan;
   import org.springframework.web.bind.annotation.GetMapping;
   import org.springframework.web.bind.annotation.RestController;
   
   import javax.annotation.Resource;
   import java.util.UUID;
   
   @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>
   `

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services