gaoweijie opened a new issue #5704:
URL: https://github.com/apache/skywalking/issues/5704


   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   - [√] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
        Does skywalking support hot deployment? My understanding is that it 
should be supported, because JDK guarantees the ability of agentmain.
        When I use the cold start(premian), I can get the link data normally
   
![image](https://user-images.githubusercontent.com/8943447/96665917-97e85d80-1388-11eb-8d67-c1dc13314b99.png)
   
        When I try to deploy using the hot deployment method(agentmain), I can 
only get the information at the JVM level, but not other information (such as 
link or trace information)
       
   
![image](https://user-images.githubusercontent.com/8943447/96666713-48a32c80-138a-11eb-83ad-1cd633b8c24a.png)
   
   
   
   below is java code's core main method in my agent.jar:
   
      public static void main(String[] args) {
           try {
               List<VirtualMachineDescriptor> vmList = VirtualMachine.list();
               for (VirtualMachineDescriptor virtualMachineDescriptor : vmList) 
{
                   System.out.println("pid=" + virtualMachineDescriptor.id() + 
"\t" + virtualMachineDescriptor.displayName());
                   if 
(virtualMachineDescriptor.displayName().toLowerCase().contains("UserApplication".toLowerCase())
 ||
                           
virtualMachineDescriptor.displayName().toLowerCase().contains("LoginApplication".toLowerCase()))
 {
                       String pid = virtualMachineDescriptor.id();
                       VirtualMachine virtualMachine = 
VirtualMachine.attach(pid);
   
                       virtualMachine.loadAgent( 
                               
"/Users/gaoweijie/Documents/project/skywalkingDemo/testProject/skywalking/skywalking-agent/skywalking-agent.jar=agent.service_name="
 
                                       + virtualMachineDescriptor.displayName() 
+ ",collector.backend_service=localhost:11800" );
               }
               }
           } catch (Exception e) {
               e.printStackTrace();
           }
   
   ___
   ###
   - Which version of SkyWalking, OS and JRE?
      JDK1.8 、  MAC-OS 、the latest version apach Skywalking.  
   
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to