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 2019/06/14 11:59:31 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #2846: Add config to control tracing sql parameters in MySQL agent

kezhenxu94 commented on a change in pull request #2846: Add config to control tracing sql parameters in MySQL agent
URL: https://github.com/apache/skywalking/pull/2846#discussion_r293777086
 
 

 ##########
 File path: apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/define/StatementEnhanceInfos.java
 ##########
 @@ -31,11 +34,13 @@
     private ConnectionInfo connectionInfo;
     private String statementName;
     private String sql;
+    private Map<Integer, Object> parametersKeyedByIndex;
 
     public StatementEnhanceInfos(ConnectionInfo connectionInfo, String sql, String statementName) {
         this.connectionInfo = connectionInfo;
         this.sql = sql;
         this.statementName = statementName;
+        this.parametersKeyedByIndex = new TreeMap<Integer, Object>();
 
 Review comment:
   1. We need to keep the parameters' order, because user may invoke `ps.setString(2, "val2");` before `ps.setString(1, "val1")`, and we need to print `val2, val1`.
   2. Got it, will improve this later

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services