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:27:54 UTC

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

wu-sheng 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_r293768204
 
 

 ##########
 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. Why treeMap?
   2. Don't create the map if no parameter tracing. Map creation is a high payload. You could test 😄

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