wankai123 commented on code in PR #12316:
URL: https://github.com/apache/skywalking/pull/12316#discussion_r1634009813


##########
oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/rt/PromQLExprQueryVisitor.java:
##########
@@ -440,6 +440,32 @@ private Entity buildEntity(Layer layer,
                 checkLabels(labelMap, LabelName.ENDPOINT);
                 entity.setEndpointName(labelMap.get(LabelName.ENDPOINT));
                 break;
+            case ServiceRelation:
+                checkLabels(labelMap, LabelName.DEST_SERVICE);
+                checkLabels(labelMap, LabelName.DEST_LAYER);
+                
entity.setDestServiceName(labelMap.get(LabelName.DEST_SERVICE));
+                
entity.setDestNormal(Layer.nameOf(labelMap.get(LabelName.DEST_LAYER)).isNormal());
+                break;
+            case ServiceInstanceRelation:
+                checkLabels(labelMap, LabelName.DEST_SERVICE);
+                checkLabels(labelMap, LabelName.DEST_SERVICE_INSTANCE);
+                checkLabels(labelMap, LabelName.SERVICE_INSTANCE);
+                checkLabels(labelMap, LabelName.DEST_LAYER);
+                
entity.setServiceInstanceName(labelMap.get(LabelName.SERVICE_INSTANCE));
+                
entity.setDestServiceInstanceName(labelMap.get(LabelName.DEST_SERVICE_INSTANCE));
+                
entity.setDestServiceName(labelMap.get(LabelName.DEST_SERVICE));
+                
entity.setDestNormal(Layer.nameOf(labelMap.get(LabelName.DEST_LAYER)).isNormal());
+                break;
+            case EndpointRelation:
+                checkLabels(labelMap, LabelName.DEST_SERVICE);
+                checkLabels(labelMap, LabelName.DEST_ENDPOINT);
+                checkLabels(labelMap, LabelName.ENDPOINT);
+                checkLabels(labelMap, LabelName.DEST_LAYER);

Review Comment:
   ```suggestion
                   checkLabels(labelMap, LabelName.ENDPOINT, 
LabelName.DEST_SERVICE, LabelName.DEST_ENDPOINT, LabelName.ENDPOINT, 
LabelName.DEST_LAYER);
   ```



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to