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/10/21 09:45:42 UTC

[GitHub] [skywalking-java] pg-yang opened a new pull request, #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

pg-yang opened a new pull request, #362:
URL: https://github.com/apache/skywalking-java/pull/362

   <!--
       ⚠️ 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 adding a new plugin, follow the checklist 👇 ====
   ### Add an agent plugin to support <framework name>
   - [ ] Add a test case for the new plugin, refer to [the doc](https://github.com/apache/skywalking-java/blob/main/docs/en/setup/service-agent/java-agent/Plugin-test.md)
   - [ ] Add a component id in [the component-libraries.yml](https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/component-libraries.yml)
   - [ ] Add a logo in [the UI repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
        ==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, 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-java/blob/main/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-java/blob/main/CHANGES.md).
   
   There is an issue about `NotNullAssertor` in agent  plugin test when checking tag with null value 
   
   https://github.com/apache/skywalking-java/blob/6d5bbe8e5f7edec0cb10e3772266b6f632a04a34/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/util/TagValuePair.java#L41-L46
   Like  above code , if the value of tag is null , we wouldn't set anything to value , and the value would be a blank string, , The   blank string is initiated by `KeyStringValuePair.Builder` which compiled by  protobuf . So the  result of  `NotNullAssertor` alway is true .
   
   This is  `KeyStringValuePair.Builder` : 
   
   ![image](https://user-images.githubusercontent.com/3917424/197161608-cddb5938-11f8-41d2-ac53-6e5ae8242141.png)
   
   This is  why the tag of `mq.broker`  is  null   ,but  the test sill passed 
   
   https://github.com/apache/skywalking-java/blob/6d5bbe8e5f7edec0cb10e3772266b6f632a04a34/test/plugin/scenarios/rabbitmq-scenario/config/expectedData.yaml#L33


-- 
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-java] wu-sheng commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

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

   Make sense. 


-- 
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-java] pg-yang commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

Posted by GitBox <gi...@apache.org>.
pg-yang commented on PR #362:
URL: https://github.com/apache/skywalking-java/pull/362#issuecomment-1286949934

   OK . Got  it 


-- 
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-java] pg-yang commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

Posted by GitBox <gi...@apache.org>.
pg-yang commented on PR #362:
URL: https://github.com/apache/skywalking-java/pull/362#issuecomment-1286952405

   Sure  .   


-- 
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-java] pg-yang commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

Posted by GitBox <gi...@apache.org>.
pg-yang commented on PR #362:
URL: https://github.com/apache/skywalking-java/pull/362#issuecomment-1286941987

   Yes , I  think it's  necessary  , I previously confirmed  virtual mq related tag through   `expectedData.yaml` in  test case , and it  seems not accuracy for now  . 
   Please wait until I finish `not blank` . It  could help us to check whether others mq plugin's  tag is right ? 


-- 
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-java] wu-sheng commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

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

   But for this PR, I think if you have fixed for rabbit MQ plugin, we could merge first. 
   One PR for one thing would be a good practice.


-- 
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-java] pg-yang commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

Posted by GitBox <gi...@apache.org>.
pg-yang commented on PR #362:
URL: https://github.com/apache/skywalking-java/pull/362#issuecomment-1286904932

   @wu-sheng  Did you look the above comment ?  
   In a word  ,  `NotNullAssertor `  maybe not accurate  with tag which value is null .
   We  could  provide  `NotBlankAssertor` in  test  tool project  , or  set the value to  keyValueBuilder even if it's null 


-- 
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-java] wu-sheng commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

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

   So, I could merge this?


-- 
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-java] wu-sheng merged pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

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


-- 
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-java] wu-sheng commented on pull request #362: Polish up rabbitmq-5.x plugin to fix missing broker tag on consumer side

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

   > We could provide NotBlankAssertor in test tool project , or set the value to keyValueBuilder even if it's null
   
   Usually, we don't suggest post tag with empty value, so, we only have `not null` for now. If you feel necessary, `not blank` should be fine, but only for string field or tag.


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