Ricehomesky commented on code in PR #693:
URL: https://github.com/apache/skywalking-java/pull/693#discussion_r1650087855


##########
apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java:
##########
@@ -66,11 +67,18 @@ public void beforeMethod(EnhancedInstance objInst, Method 
method, Object[] allAr
         if (allArguments[0] instanceof CommandsData) {
             operationName = operationName + "BATCH_EXECUTE";
             command = "BATCH_EXECUTE";
+            if (RedissonPluginConfig.Plugin.Redisson.SHOW_BATCH_COMMANDS) {
+                command += ":" + showBatchCommands((CommandsData) 
allArguments[0]);
+            }
         } else if (allArguments[0] instanceof CommandData) {
             CommandData commandData = (CommandData) allArguments[0];
             command = commandData.getCommand().getName();
-            operationName = operationName + command;
-            arguments = commandData.getParams();
+            if ("PING".equals(command) && 
!RedissonPluginConfig.Plugin.Redisson.SHOW_PING_COMMAND) {

Review Comment:
   @wu-sheng This change will lead to a problem that the plugin cannot find an 
active span to close after "Ping" execution. Skywalking would throw a 
NullPointerException. Maybe it needs a flag to duel this situation.
   
![NullPointerException](https://github.com/apache/skywalking-java/assets/63052374/75bed105-a871-47c4-ae50-b800d1888c0c)
   



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

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

Reply via email to