evanxuhe opened a new issue #3150: HeartTime don't update when using agent5.0 URL: https://github.com/apache/skywalking/issues/3150 Please answer these questions before submitting your issue. - Why do you submit this issue? - [ ] bug ___ ### Question - What do you want to know? I found that **The heartbeat time of instance using agent5.0 won't update autimatically**. I think it's because the if judgement below to update, will always be negative. While this will be OK in SW5.0 But in SW6.1+ UI shows services according hearttime and causes no svc shows in UI after 15min. I try to connect agent5.0 to collector6.1 and find this problem. **I just note this in case that someone else has the same experience,dont need any response**. ___ ### Bug - Which version of SkyWalking, OS and JRE? Skywalking agent 5.0.0GA - Which company or project? - What happen? ```org.apache.skywalking.apm.agent.core.remote.AppAndServiceRegisterClient``` update ht when lastSegmentTime - System.currentTimeMillis() > 60 * 1000 but lastSegmentTime will always before System.currentTimeMillis() As you can see, it will never take effect ```java if (lastSegmentTime - System.currentTimeMillis() > 60 * 1000) { instanceDiscoveryServiceBlockingStub.heartbeat(ApplicationInstanceHeartbeat.newBuilder() .setApplicationInstanceId(RemoteDownstreamConfig.Agent.APPLICATION_INSTANCE_ID) .setHeartbeatTime(System.currentTimeMillis()) .build()); } NetworkAddressDictionary.INSTANCE.syncRemoteDictionary(networkAddressRegisterServiceBlockingStub); OperationNameDictionary.INSTANCE.syncRemoteDictionary(serviceNameDiscoveryServiceBlockingStub); ``` ```java @Override public void afterFinished(TraceSegment traceSegment) { lastSegmentTime = System.currentTimeMillis(); } ```
---------------------------------------------------------------- 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] With regards, Apache Git Services
