wu-sheng commented on a change in pull request #4059: Remove the local/exit span register mechanism in Java agent scenario URL: https://github.com/apache/skywalking/pull/4059#discussion_r357899439
########## File path: oap-server/server-receiver-plugin/skywalking-register-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/register/provider/handler/v6/grpc/RegisterServiceHandler.java ########## @@ -163,14 +163,19 @@ public RegisterServiceHandler(ModuleManager moduleManager) { int serviceId = endpoint.getServiceId(); String endpointName = endpoint.getEndpointName(); - int endpointId = inventoryService.getOrCreate(serviceId, endpointName, DetectPoint.fromNetworkProtocolDetectPoint(endpoint.getFrom())); - - if (endpointId != Const.NONE) { - builder.addElements(EndpointMappingElement.newBuilder() - .setServiceId(serviceId) - .setEndpointName(endpointName) - .setEndpointId(endpointId) - .setFrom(endpoint.getFrom())); + DetectPoint detectPoint = DetectPoint.fromNetworkProtocolDetectPoint(endpoint.getFrom()); + if (DetectPoint.SERVER.equals(detectPoint)) { + int endpointId = inventoryService.getOrCreate(serviceId, endpointName, detectPoint); + + if (endpointId != Const.NONE) { + builder.addElements(EndpointMappingElement.newBuilder() + .setServiceId(serviceId) + .setEndpointName(endpointName) + .setEndpointId(endpointId) + .setFrom(endpoint.getFrom())); + } + } else { + logger.warn("Unexpected endpoint register, endpoint isn't detected from server side. {}", request); Review comment: To all reviewers, this needs to be added into changelog and FAQ, as people may face a lot of these logs when agents have not upgraded. What do you think? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services