JaredTan95 commented on a change in pull request #2156: Support Service Instance Inventory properties and bug fixed URL: https://github.com/apache/incubator-skywalking/pull/2156#discussion_r247346078
########## 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 ########## @@ -83,34 +86,39 @@ public RegisterServiceHandler(ModuleManager moduleManager) { request.getInstancesList().forEach(instance -> { ServiceInventory serviceInventory = serviceInventoryCache.get(instance.getServiceId()); - ServiceInstanceInventory.AgentOsInfo agentOsInfo = new ServiceInstanceInventory.AgentOsInfo(); + JsonObject instanceProperties = new JsonObject(); + List<String> ipv4s = new ArrayList<>(); + for (KeyStringValuePair property : instance.getPropertiesList()) { String key = property.getKey(); switch (key) { - case "OSName": - agentOsInfo.setOsName(property.getValue()); + case HOST_NAME: + instanceProperties.addProperty(HOST_NAME, property.getValue()); + case OS_NAME: + instanceProperties.addProperty(OS_NAME, property.getValue()); break; - case "hostname": - agentOsInfo.setHostname(property.getValue()); + case LANGUAGE: + instanceProperties.addProperty(LANGUAGE, property.getValue()); break; case "ipv4": Review comment: `case "ipv4"` ---> `case IPV4S` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services