You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wankai123 (via GitHub)" <gi...@apache.org> on 2024/01/12 02:16:40 UTC

[PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

wankai123 opened a new pull request, #11756:
URL: https://github.com/apache/skywalking/pull/11756

   
   relate to https://github.com/apache/skywalking/discussions/11669
   
   


-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #11756:
URL: https://github.com/apache/skywalking/pull/11756#discussion_r1449945334


##########
docs/en/concepts-and-designs/service-hierarchy.md:
##########
@@ -0,0 +1,42 @@
+# Service Hierarchy
+SkyWalking v10 introduces a new concept `Service Hierarchy` which defines the relationships of existing logically same services in various layers.
+OAP will detect the services from different layers, and try to build the connections.
+
+## Detect Service Hierarchy Connections
+There 2 ways to detect the connections:
+1. Automatically matching through OAP internal mechanism, no extra work is required.
+2. Build the connections through specific agents.
+
+**Note:** All the relationships should be defined in the `config/hierarchy-definition.yml` file.
+
+### Automatically Matching 
+
+| Upper layer | Lower layer  | Matching rule                                                         |
+|-------------|--------------|-----------------------------------------------------------------------|
+| MESH        | MESH_DP      | upper service name equals lower service name                          |
+| MESH        | K8S_SERVICE  | upper service short name equals lower service short name              |
+| MESH_DP     | K8S_SERVICE  | upper service short name equals lower service short name              |
+| GENERAL     | K8S_SERVICE  | upper service short name equals lower service name without namespace  |
+
+### Build Through Specific Agents
+Use agent tech involved(such as eBPF) and deployment tools(such as operator and agent injector) detect the service hierarchy relations.
+
+| Upper layer | Lower layer  | Agent |
+|-------------|--------------|-------|
+
+
+# Instance Hierarchy
+Instance Hierarchy relationship follows the same definition as Service Hierarchy.
+
+### Automatically Matching
+If the service hierarchy is built, the instance hierarchy relationship could be detected automatically through 
+the following rules:
+1. The upper instance name equals the lower instance name.
+2. The upper instance attribute `pod/hostname` equals the lower instance attribute `pod/hostname`.
+3. The upper instance attribute `pod/hostname` equals the lower instance name.
+4. The upper instance name equals the lower instance attribute `pod/hostname`.
+
+### Build Through Internal API
+```java
+public void toInstanceHierarchyRelation(String upperInstanceName, String upperServiceName, Layer upperServiceLayer, String lowerInstanceName, String lowerServiceName, Layer lowerServiceLayer);
+```

Review Comment:
   You missed to update this part of docs.



-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #11756:
URL: https://github.com/apache/skywalking/pull/11756#discussion_r1449863737


##########
docs/en/concepts-and-designs/service-hierarchy.md:
##########
@@ -0,0 +1,46 @@
+# Service Hierarchy
+SkyWalking v10 introduces a new concept `Service Hierarchy` which defines the relationships of existing logically same services in various layers.
+OAP will detect the services from different layers, and try to build the connections.
+
+## Detect Service Hierarchy Connections
+There 2 ways to detect the connections:
+1. Automatically matching through the existing service info.
+2. Build the connections through the internal API.

Review Comment:
   ```suggestion
   2. Build the connections through specific agents.
   ```



-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #11756:
URL: https://github.com/apache/skywalking/pull/11756#discussion_r1449864025


##########
docs/en/concepts-and-designs/service-hierarchy.md:
##########
@@ -0,0 +1,46 @@
+# Service Hierarchy
+SkyWalking v10 introduces a new concept `Service Hierarchy` which defines the relationships of existing logically same services in various layers.
+OAP will detect the services from different layers, and try to build the connections.
+
+## Detect Service Hierarchy Connections
+There 2 ways to detect the connections:
+1. Automatically matching through the existing service info.

Review Comment:
   ```suggestion
   1. Automatically matching through OAP internal mechanism, no extra work is required.
   ```



-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #11756:
URL: https://github.com/apache/skywalking/pull/11756#discussion_r1449862800


##########
docs/en/concepts-and-designs/service-hierarchy.md:
##########
@@ -0,0 +1,46 @@
+# Service Hierarchy
+SkyWalking v10 introduces a new concept `Service Hierarchy` which defines the relationships of existing logically same services in various layers.
+OAP will detect the services from different layers, and try to build the connections.
+
+## Detect Service Hierarchy Connections
+There 2 ways to detect the connections:
+1. Automatically matching through the existing service info.
+2. Build the connections through the internal API.
+
+**Note:** All the relationships should be defined in the `config/hierarchy-definition.yml` file.
+
+### Automatically Matching 
+
+| Upper layer | Lower layer  | Matching rule                                                         |
+|-------------|--------------|-----------------------------------------------------------------------|
+| MESH        | MESH_DP      | upper service name equals lower service name                          |
+| MESH        | K8S_SERVICE  | upper service short name equals lower service short name              |
+| MESH_DP     | K8S_SERVICE  | upper service short name equals lower service short name              |
+| GENERAL     | K8S_SERVICE  | upper service short name equals lower service name without namespace  |
+
+### Build Through Internal API
+```java
+public void toServiceHierarchyRelation(String upperServiceName, Layer upperServiceLayer, String lowerServiceName, Layer lowerServiceLayer);
+```
+Use agent tech involved(such as eBPF) and deployment tools(such as operator and agent injector) report 
+the service hierarchy relations through the internal API.

Review Comment:
   I think APIs part is confusing for people as end users. We should focus on what is supported by which agent stack only. Could you remove others?



-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on code in PR #11756:
URL: https://github.com/apache/skywalking/pull/11756#discussion_r1449862227


##########
docs/menu.yml:
##########
@@ -318,6 +320,8 @@ catalog:
         path: "/en/concepts-and-designs/lal"
       - name: "Profiling"
         path: "/en/concepts-and-designs/profiling"
+      - name : "Configure Service Hierarchy"
+        path: "/en/concepts-and-designs/configure-service-hierarchy"

Review Comment:
   ```suggestion
         - name : "Service Hierarchy Configuration"
           path: "/en/concepts-and-designs/service-hierarchy-configuration"
   ```
   
   Could you rename the file and menu as noun, instead starting from a verb.



-- 
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-unsubscribe@skywalking.apache.org

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


Re: [PR] Add layer level query and more fields for Hierarchy, and docs. [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #11756:
URL: https://github.com/apache/skywalking/pull/11756


-- 
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-unsubscribe@skywalking.apache.org

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