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

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)

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]