wu-sheng commented on a change in pull request #1790: Add service and instance 
reset function
URL: 
https://github.com/apache/incubator-skywalking/pull/1790#discussion_r227205082
 
 

 ##########
 File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AppAndServiceRegisterClient.java
 ##########
 @@ -48,13 +52,14 @@
 @DefaultImplementor
 public class AppAndServiceRegisterClient implements BootService, 
GRPCChannelListener, Runnable, TracingContextListener {
     private static final ILog logger = 
LogManager.getLogger(AppAndServiceRegisterClient.class);
-    private static final String PROCESS_UUID = 
UUID.randomUUID().toString().replaceAll("-", "");
+    private static final String INSTANCE_UUID = 
Config.Agent.INSTANCE_UUID.equals("") ? 
UUID.randomUUID().toString().replaceAll("-", "") : Config.Agent.INSTANCE_UUID;
 
 Review comment:
   Please set UUID the first it is used, don't init here to avoid 
`Config.Agent.INSTANCE_UUID` doesn't init in time. In the old day, we didn't 
need to worry about this. So please move the initialization codes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to