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/05/13 07:56:15 UTC

[GitHub] [skywalking-java] zhyyu commented on a diff in pull request #174: Add `plugin.jdbc.trace_sql_parameters` into Configuration Discovery S…

zhyyu commented on code in PR #174:
URL: https://github.com/apache/skywalking-java/pull/174#discussion_r872104803


##########
apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/PSSetterDefinitionOfJDBCInstrumentation.java:
##########
@@ -40,11 +40,10 @@ public PSSetterDefinitionOfJDBCInstrumentation(boolean ignorable) {
     public ElementMatcher<MethodDescription> getMethodsMatcher() {
         ElementMatcher.Junction<MethodDescription> matcher = none();
 
-        if (JDBCPluginConfig.Plugin.JDBC.TRACE_SQL_PARAMETERS) {
-            final Set<String> setters = ignorable ? PS_IGNORABLE_SETTERS : PS_SETTERS;
-            for (String setter : setters) {
-                matcher = matcher.or(named(setter));
-            }
+        // remove TRACE_SQL_PARAMETERS judgement for dynamic config

Review Comment:
   There is a problem, `org.apache.skywalking.apm.plugin.jdbc.PSSetterDefinitionOfJDBCInstrumentation#getMethodsMatcher` only invoked once when instrument occur. if dynamic change later, it won't be affected, and `org.apache.skywalking.apm.plugin.jdbc.JDBCPreparedStatementSetterInterceptor#beforeMethod` will not be active even when the `TRACE_SQL_PARAMETERS` is true.



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