kezhenxu94 commented on a change in pull request #3618: add postgresql plugin agent sql param show URL: https://github.com/apache/skywalking/pull/3618#discussion_r336083497
########## File path: apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/PSSetterDefinitionOfJDBCInstrumentation.java ########## @@ -52,6 +52,13 @@ public PSSetterDefinitionOfJDBCInstrumentation(boolean ignorable) { } } + if (Config.Plugin.PostgreSQL.TRACE_SQL_PARAMETERS) { + final Set<String> setters = ignorable ? PS_IGNORABLE_SETTERS : PS_SETTERS; + for (String setter : setters) { + matcher = matcher.or(named(setter)); + } + } + Review comment: Simply collapse this to line 48 ```java if (Config.Plugin.MySQL.TRACE_SQL_PARAMETERS || Config.Plugin.PostgreSQL.TRACE_SQL_PARAMETERS) { final Set<String> setters = ignorable ? PS_IGNORABLE_SETTERS : PS_SETTERS; for (String setter : setters) { matcher = matcher.or(named(setter)); } } ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services