You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/12/16 01:50:16 UTC

[GitHub] [skywalking] wu-sheng opened a new pull request, #10164: Support multiple component IDs in the service topology level

wu-sheng opened a new pull request, #10164:
URL: https://github.com/apache/skywalking/pull/10164

   <!--
       ⚠️ Please make sure to read this template first, pull requests that don't accord with this template
       maybe closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
   ### Fix <bug description or the bug issue number or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly why the bug exists and how to fix it.
        ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->
   
   <!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👇 ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. <links/URLs here>
        ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the performance, follow the checklist 👆 ==== -->
   
   <!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
        ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
   
   * Support multiple component IDs in the service topology level.
   * Add `ElasticSearch.Keyword` annotation to declare the target field type as `keyword`.
   * [Breaking Change] Field `component_id` of `service_relation_client_side` and `service_relation_server_side` have been replaced by `component_ids`(keyword).


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


[GitHub] [skywalking] wu-sheng commented on pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#issuecomment-1354170114

   @wankai123 @kezhenxu94 @mrproliu I am thinking to add priority mechanism to the component ID to make sure the node ID is always correct. 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.

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

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


[GitHub] [skywalking] wu-sheng merged pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng merged PR #10164:
URL: https://github.com/apache/skywalking/pull/10164


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


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#discussion_r1050346504


##########
oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/TopologyQueryEsDAO.java:
##########
@@ -257,7 +257,7 @@ private List<Call.CallDetail> buildProcessRelation(String serviceInstanceId, Dur
             String entityId = (String) entityBucket.get("key");
             final Map<String, Object> componentTerms =
                 (Map<String, Object>) entityBucket.get(
-                    ServiceRelationServerSideMetrics.COMPONENT_IDS);
+                    ProcessRelationServerSideMetrics.COMPONENT_ID);

Review Comment:
   @mrproliu I think this is a bug by using service relation column name.



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


[GitHub] [skywalking] wu-sheng commented on pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#issuecomment-1354172649

   > > @toffentoffen I think you could check whether this works in your cases.
   > 
   > @wu-sheng Can you share what cases this PR tries to solve?
   
   ServA is calling ServB both in TCP and HTTP. In the history, two different RPC components(two HTTP client libs) called the same service endpoint.


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


[GitHub] [skywalking] wu-sheng commented on pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#issuecomment-1354169119

   @toffentoffen I think you could check whether this works in your cases.


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


[GitHub] [skywalking] kezhenxu94 commented on pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#issuecomment-1354171638

   > @toffentoffen I think you could check whether this works in your cases.
   
   @wu-sheng Can you share what cases this PR tries to solve?


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


[GitHub] [skywalking] wu-sheng commented on pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#issuecomment-1354140477

   NOTICE, SkyWalking booster UI is not using component IDs in the line(Call in GraphQL). We only show the component ID(one value) for the node.


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


[GitHub] [skywalking] wu-sheng commented on a diff in pull request #10164: Support multiple component IDs in the service topology level

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #10164:
URL: https://github.com/apache/skywalking/pull/10164#discussion_r1050352990


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/manual/relation/service/ServiceRelationClientSideMetrics.java:
##########
@@ -60,8 +62,9 @@ public class ServiceRelationClientSideMetrics extends Metrics {
     private String destServiceId;
     @Setter
     @Getter
-    @Column(columnName = COMPONENT_ID, storageOnly = true)
-    private int componentId;
+    @Column(columnName = COMPONENT_IDS, storageOnly = true)
+    @ElasticSearch.Keyword
+    private IntList componentIds = new IntList(3);

Review Comment:
   @kezhenxu94 @wankai123 This is what I referred to, so I added this new annotation to override type. IntList is mapping to text type field.
   
   > The field can be [Keyword](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/keyword.html), [Numeric](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/number.html), [ip](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/ip.html), [boolean](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/boolean.html), or [binary](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/binary.html).
   
   ref https://www.elastic.co/guide/en/elasticsearch/reference/7.17/search-aggregations-bucket-terms-aggregation.html



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