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/06/02 07:30:06 UTC

[GitHub] [skywalking] lujiajing1126 opened a new pull request, #9168: Add negative tags search for storage E2E

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

   <!--
       ⚠️ 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>.
   - [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/changelog/docs/en/changes/changes.md).
   
   This PR intends to add negative test for https://github.com/apache/skywalking/issues/9105 and corresponding PR https://github.com/apache/skywalking-banyandb/pull/120


-- 
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] lujiajing1126 commented on a diff in pull request #9168: Add negative tags search for storage E2E

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #9168:
URL: https://github.com/apache/skywalking/pull/9168#discussion_r887673161


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   Yes. No trace segment has both `http.method=POST` and `http.status_code=200`. (IIRC only `http.status_code` > 400 is recorded in Java Agent)
   
   The trace segment only has `http.method=POST`. So if the database uses `OR` logical relations, i.e. use intersection instead of subset, there should be traces returned.



-- 
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 #9168: Add negative tags search for storage E2E

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


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   `http.status_code >= 400`? This is strange. If there is a HTTP Post, it should be 200.



-- 
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 #9168: Add negative tags search for storage E2E

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


-- 
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] lujiajing1126 commented on a diff in pull request #9168: Add negative tags search for storage E2E

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #9168:
URL: https://github.com/apache/skywalking/pull/9168#discussion_r887697868


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   > `http.status_code >= 400`? This is strange. If there is a HTTP Post, it should be 200.
   
   Yes, here it is `200`. I mean `status_code` will be recorded as a tag only if it is `>= 400`.
   
   For example, https://github.com/apache/skywalking-java/blob/3997f0256056788bd054ee37e4603c11c0fd6756/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L204-L207



-- 
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] lujiajing1126 commented on a diff in pull request #9168: Add negative tags search for storage E2E

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #9168:
URL: https://github.com/apache/skywalking/pull/9168#discussion_r887673161


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   Yes. No trace segment has both `http.method=POST` and `http.status_code=200`. (IIRC only `http.status_code` >= 400 is recorded in Java Agent)
   
   The trace segment only has `http.method=POST`. So if the database uses `OR` logical relations, i.e. use intersection instead of subset, there should be traces returned.



-- 
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] lujiajing1126 commented on a diff in pull request #9168: Add negative tags search for storage E2E

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on code in PR #9168:
URL: https://github.com/apache/skywalking/pull/9168#discussion_r887697868


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   > `http.status_code >= 400`? This is strange. If there is a HTTP Post, it should be 200.
   
   Yes, it is a successful request. I meant `status_code` will be recorded as a tag only if it is `>= 400`.
   
   For example, https://github.com/apache/skywalking-java/blob/3997f0256056788bd054ee37e4603c11c0fd6756/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java#L204-L207



-- 
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 #9168: Add negative tags search for storage E2E

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


##########
test/e2e-v2/cases/storage/storage-cases.yaml:
##########
@@ -42,8 +42,11 @@ cases:
     expected: expected/metrics-has-value.yml
 
   # trace segment list
-  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls  --tags http.method=POST
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
     expected: expected/traces-list.yml
+  # negative tags search: relationship should be logical AND instead of logical OR
+  - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST,http.status_code=200

Review Comment:
   Is there no trace segment having both `http.method=POST` and `http.status_code=200`? Because of the test 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