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/10 02:05:31 UTC

[GitHub] [skywalking-java] w-a-n-g-s-h-u-n opened a new pull request, #345: Redisson param beautify

w-a-n-g-s-h-u-n opened a new pull request, #345:
URL: https://github.com/apache/skywalking-java/pull/345

   <!--
       ⚠️ 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).
   


-- 
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] w-a-n-g-s-h-u-n commented on pull request #345: Redisson param beautify

Posted by GitBox <gi...@apache.org>.
w-a-n-g-s-h-u-n commented on PR #345:
URL: https://github.com/apache/skywalking-java/pull/345#issuecomment-1274349011

   > The plugin test verified your changes, and fails, https://github.com/apache/skywalking-java/actions/runs/3217108062/jobs/5260283393
   
   I gave up on modifying the ByteBuf case. In fact, I didn't figure out how the test case works


-- 
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 #345: Redisson param beautify

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

   You should fix CI.


-- 
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 a diff in pull request #345: Redisson param beautify

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


##########
apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java:
##########
@@ -88,7 +88,14 @@ private void addCommandData(StringBuilder dbStatement, CommandData commandData)
         if (RedissonPluginConfig.Plugin.Redisson.TRACE_REDIS_PARAMETERS && commandData.getParams() != null) {
             for (Object param : commandData.getParams()) {
                 dbStatement.append(DELIMITER_SPACE);
-                String paramStr = param instanceof ByteBuf ? QUESTION_MARK : String.valueOf(param.toString());
+                String paramStr;
+                if (param instanceof ByteBuf) {
+                    paramStr = QUESTION_MARK;
+                } else if (param instanceof byte[]) {
+                    paramStr = new String((byte[]) param);

Review Comment:
   Are you sure the byte[] could be serialized as a String?



-- 
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] w-a-n-g-s-h-u-n commented on a diff in pull request #345: Redisson param beautify

Posted by GitBox <gi...@apache.org>.
w-a-n-g-s-h-u-n commented on code in PR #345:
URL: https://github.com/apache/skywalking-java/pull/345#discussion_r990928166


##########
apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java:
##########
@@ -88,7 +87,14 @@ private void addCommandData(StringBuilder dbStatement, CommandData commandData)
         if (RedissonPluginConfig.Plugin.Redisson.TRACE_REDIS_PARAMETERS && commandData.getParams() != null) {
             for (Object param : commandData.getParams()) {
                 dbStatement.append(DELIMITER_SPACE);
-                String paramStr = param instanceof ByteBuf ? QUESTION_MARK : String.valueOf(param.toString());
+                String paramStr;
+                if (param instanceof ByteBuf) {

Review Comment:
   > Could you provide what is a bytebuf?
   
   I get results like "EXISTS [B@1ce73d9a",But I'm not sure it's always like that
   
   `if (param instanceof ByteBuf)` may always be `false`
   



-- 
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] w-a-n-g-s-h-u-n commented on pull request #345: Redisson param beautify

Posted by GitBox <gi...@apache.org>.
w-a-n-g-s-h-u-n commented on PR #345:
URL: https://github.com/apache/skywalking-java/pull/345#issuecomment-1272826340

   > You should fix CI.
   
   Done
   
   > You should fix CI.
   
   


-- 
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 #345: Redisson param beautify

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

   This PR has no update in half month. I have to close this.
   If you want to continue on this, let's know.


-- 
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 #345: Redisson param beautify

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

   The plugin test verified your changes, and fails, https://github.com/apache/skywalking-java/actions/runs/3217108062/jobs/5260283393


-- 
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 closed pull request #345: Redisson param beautify

Posted by GitBox <gi...@apache.org>.
wu-sheng closed pull request #345: Redisson param beautify
URL: https://github.com/apache/skywalking-java/pull/345


-- 
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 a diff in pull request #345: Redisson param beautify

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


##########
apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java:
##########
@@ -88,7 +87,14 @@ private void addCommandData(StringBuilder dbStatement, CommandData commandData)
         if (RedissonPluginConfig.Plugin.Redisson.TRACE_REDIS_PARAMETERS && commandData.getParams() != null) {
             for (Object param : commandData.getParams()) {
                 dbStatement.append(DELIMITER_SPACE);
-                String paramStr = param instanceof ByteBuf ? QUESTION_MARK : String.valueOf(param.toString());
+                String paramStr;
+                if (param instanceof ByteBuf) {

Review Comment:
   Could you provide what is a bytebuf?



-- 
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 #345: Redisson param beautify

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

   @w-a-n-g-s-h-u-n Are you going to continue on this PR, we are waiting for your explanaion.


-- 
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 a diff in pull request #345: Redisson param beautify

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


##########
apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java:
##########
@@ -88,7 +87,14 @@ private void addCommandData(StringBuilder dbStatement, CommandData commandData)
         if (RedissonPluginConfig.Plugin.Redisson.TRACE_REDIS_PARAMETERS && commandData.getParams() != null) {
             for (Object param : commandData.getParams()) {
                 dbStatement.append(DELIMITER_SPACE);
-                String paramStr = param instanceof ByteBuf ? QUESTION_MARK : String.valueOf(param.toString());
+                String paramStr;
+                if (param instanceof ByteBuf) {

Review Comment:
   How does the latest look like? Could you post some examples?



-- 
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 #345: Redisson param beautify

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

   Also, the `changes.md` in the root should be updated accordingly.


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