From d5ec43848f0ac586e3d9062683891b503cb68d51 Mon Sep 17 00:00:00 2001 From: xzyJavaX <49760141+xzyJavaX@users.noreply.github.com> Date: Wed, 19 Jul 2023 20:56:37 +0800 Subject: [PATCH] merge two instrumentation classes to avoid duplicate enhancements in mysql plugins (#581) --- CHANGES.md | 1 + ...ava => CacheIpsDriverInstrumentation.java} | 5 +-- .../v5/define/DriverInstrumentation.java | 39 ------------------- .../src/main/resources/skywalking-plugin.def | 3 +- ...ava => CacheIpsDriverInstrumentation.java} | 2 +- .../v6/define/DriverInstrumentation.java | 39 ------------------- .../src/main/resources/skywalking-plugin.def | 3 +- ...ava => CacheIpsDriverInstrumentation.java} | 2 +- .../v8/define/DriverInstrumentation.java | 39 ------------------- .../src/main/resources/skywalking-plugin.def | 3 +- .../jdbc/mysql/DriverConnectInterceptor.java | 10 +++++ 11 files changed, 18 insertions(+), 128 deletions(-) rename apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/{CacheIpsInstrumentation.java => CacheIpsDriverInstrumentation.java} (91%) delete mode 100644 apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/DriverInstrumentation.java rename apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/{CacheIpsInstrumentation.java => CacheIpsDriverInstrumentation.java} (96%) delete mode 100644 apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/DriverInstrumentation.java rename apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/{CacheIpsInstrumentation.java => CacheIpsDriverInstrumentation.java} (96%) delete mode 100644 apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/DriverInstrumentation.java diff --git a/CHANGES.md b/CHANGES.md index 49b142e71..edd97691d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,7 @@ Release Notes. re-transform. * Fix witness class in springmvc-annotation-5.x-plugin to avoid falling into v3 use cases. * Fix Jedis-2.x plugin bug and add test for redis cluster scene +* Merge two instrumentation classes to avoid duplicate enhancements in mysql plugins. ``` * SWAuxiliaryTypeNamingStrategy diff --git a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsDriverInstrumentation.java similarity index 91% rename from apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsInstrumentation.java rename to apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsDriverInstrumentation.java index 659fa820e..7a372c680 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/CacheIpsDriverInstrumentation.java @@ -28,10 +28,9 @@ import static net.bytebuddy.matcher.ElementMatchers.named; import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; import static org.apache.skywalking.apm.plugin.jdbc.mysql.Constants.DRIVER_CONNECT_INTERCEPTOR; -public class CacheIpsInstrumentation extends AbstractMysqlInstrumentation { +public class CacheIpsDriverInstrumentation extends AbstractMysqlInstrumentation { private static final String ENHANCE_CLASS_NON_REG_REP = "com.mysql.jdbc.NonRegisteringReplicationDriver"; - private static final String ENHANCE_CLASS = "com.mysql.jdbc.Driver"; private static final String ENHANCE_CLASS_NON_REG = "com.mysql.jdbc.NonRegisteringDriver"; @Override @@ -63,6 +62,6 @@ public class CacheIpsInstrumentation extends AbstractMysqlInstrumentation { @Override protected ClassMatch enhanceClass() { - return byMultiClassMatch(ENHANCE_CLASS, ENHANCE_CLASS_NON_REG, ENHANCE_CLASS_NON_REG_REP); + return byMultiClassMatch(ENHANCE_CLASS_NON_REG, ENHANCE_CLASS_NON_REG_REP); } } diff --git a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/DriverInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/DriverInstrumentation.java deleted file mode 100644 index a0d788c1f..000000000 --- a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v5/define/DriverInstrumentation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define; - -import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch; -import org.apache.skywalking.apm.plugin.jdbc.define.AbstractDriverInstrumentation; - -import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; - -/** - * {@link DriverInstrumentation} presents that skywalking intercepts {@link com.mysql.jdbc.Driver}. - */ -public class DriverInstrumentation extends AbstractDriverInstrumentation { - @Override - protected ClassMatch enhanceClass() { - return byMultiClassMatch("com.mysql.jdbc.Driver", "com.mysql.cj.jdbc.Driver", "com.mysql.jdbc.NonRegisteringDriver"); - } - - @Override - protected String[] witnessClasses() { - return new String[] {Constants.WITNESS_MYSQL_5X_CLASS}; - } -} diff --git a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/resources/skywalking-plugin.def b/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/resources/skywalking-plugin.def index f62d8fbe3..fb4bde5a4 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/resources/skywalking-plugin.def +++ b/apm-sniffer/apm-sdk-plugin/mysql-5.x-plugin/src/main/resources/skywalking-plugin.def @@ -14,13 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.DriverInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.Mysql5xConnectionInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.Mysql50ConnectionInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.CallableInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.PreparedStatementInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.StatementInstrumentation -mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.CacheIpsInstrumentation +mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.CacheIpsDriverInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.ConnectionImplCreateInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.PreparedStatementIgnoredSetterInstrumentation mysql-5.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v5.define.PreparedStatementSetterInstrumentation diff --git a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsDriverInstrumentation.java similarity index 96% rename from apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsInstrumentation.java rename to apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsDriverInstrumentation.java index 6f22622c7..65508e845 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/CacheIpsDriverInstrumentation.java @@ -28,7 +28,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named; import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; import static org.apache.skywalking.apm.plugin.jdbc.mysql.Constants.DRIVER_CONNECT_INTERCEPTOR; -public class CacheIpsInstrumentation extends AbstractMysqlInstrumentation { +public class CacheIpsDriverInstrumentation extends AbstractMysqlInstrumentation { private static final String ENHANCE_CLASS_NON_REG = "com.mysql.cj.jdbc.NonRegisteringDriver"; diff --git a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/DriverInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/DriverInstrumentation.java deleted file mode 100644 index 87ea26890..000000000 --- a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/define/DriverInstrumentation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define; - -import org.apache.skywalking.apm.plugin.jdbc.define.AbstractDriverInstrumentation; -import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch; - -import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; - -/** - * {@link DriverInstrumentation} presents that skywalking intercepts {@link com.mysql.jdbc.Driver}. - */ -public class DriverInstrumentation extends AbstractDriverInstrumentation { - @Override - protected ClassMatch enhanceClass() { - return byMultiClassMatch("com.mysql.jdbc.Driver", "com.mysql.cj.jdbc.Driver", "com.mysql.jdbc.NonRegisteringDriver"); - } - - @Override - protected String[] witnessClasses() { - return new String[] {Constants.WITNESS_MYSQL_6X_CLASS}; - } -} diff --git a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/resources/skywalking-plugin.def b/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/resources/skywalking-plugin.def index c5af17ea9..c229981a4 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/resources/skywalking-plugin.def +++ b/apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/resources/skywalking-plugin.def @@ -14,12 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.DriverInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.ConnectionInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.CallableInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.PreparedStatementInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.StatementInstrumentation -mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.CacheIpsInstrumentation +mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.CacheIpsDriverInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.ConnectionImplCreateInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.PreparedStatementSetterInstrumentation mysql-6.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v6.define.PreparedStatementIgnoredSetterInstrumentation diff --git a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsDriverInstrumentation.java similarity index 96% rename from apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsInstrumentation.java rename to apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsDriverInstrumentation.java index 028985fc0..419d79d3a 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/CacheIpsDriverInstrumentation.java @@ -28,7 +28,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named; import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; import static org.apache.skywalking.apm.plugin.jdbc.mysql.Constants.DRIVER_CONNECT_INTERCEPTOR; -public class CacheIpsInstrumentation extends AbstractMysqlInstrumentation { +public class CacheIpsDriverInstrumentation extends AbstractMysqlInstrumentation { private static final String ENHANCE_CLASS_NON_REG = "com.mysql.cj.jdbc.NonRegisteringDriver"; diff --git a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/DriverInstrumentation.java b/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/DriverInstrumentation.java deleted file mode 100644 index 93078de32..000000000 --- a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v8/define/DriverInstrumentation.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define; - -import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch; -import org.apache.skywalking.apm.plugin.jdbc.define.AbstractDriverInstrumentation; - -import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch; - -/** - * {@link DriverInstrumentation} presents that skywalking intercepts {@link com.mysql.jdbc.Driver}. - */ -public class DriverInstrumentation extends AbstractDriverInstrumentation { - @Override - protected ClassMatch enhanceClass() { - return byMultiClassMatch("com.mysql.jdbc.Driver", "com.mysql.cj.jdbc.Driver", "com.mysql.jdbc.NonRegisteringDriver"); - } - - @Override - protected String[] witnessClasses() { - return new String[] {Constants.WITNESS_MYSQL_8X_CLASS}; - } -} diff --git a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/resources/skywalking-plugin.def b/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/resources/skywalking-plugin.def index c0c811261..29ba3e768 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/resources/skywalking-plugin.def +++ b/apm-sniffer/apm-sdk-plugin/mysql-8.x-plugin/src/main/resources/skywalking-plugin.def @@ -14,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.DriverInstrumentation mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.ConnectionImplCreateInstrumentation mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.ConnectionInstrumentation mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.CallableInstrumentation @@ -23,4 +22,4 @@ mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.StatementInstrum mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.PreparedStatementSetterInstrumentation mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.PreparedStatementNullSetterInstrumentation mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.PreparedStatementIgnoredSetterInstrumentation -mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.CacheIpsInstrumentation +mysql-8.x=org.apache.skywalking.apm.plugin.jdbc.mysql.v8.define.CacheIpsDriverInstrumentation diff --git a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/DriverConnectInterceptor.java b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/DriverConnectInterceptor.java index d17573dd3..fc1e426da 100644 --- a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/DriverConnectInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/DriverConnectInterceptor.java @@ -18,9 +18,12 @@ package org.apache.skywalking.apm.plugin.jdbc.mysql; +import org.apache.skywalking.apm.agent.core.boot.ServiceManager; +import org.apache.skywalking.apm.agent.core.conf.dynamic.ConfigurationDiscoveryService; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult; +import org.apache.skywalking.apm.plugin.jdbc.TraceSqlParametersWatcher; import org.apache.skywalking.apm.plugin.jdbc.connectionurl.parser.URLParser; import java.lang.reflect.Method; @@ -31,11 +34,18 @@ public class DriverConnectInterceptor implements InstanceMethodsAroundIntercepto public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws Throwable { ConnectionCache.save(URLParser.parser(allArguments[0].toString())); + TraceSqlParametersWatcher traceSqlParametersWatcher = new TraceSqlParametersWatcher("plugin.jdbc.trace_sql_parameters"); + ConfigurationDiscoveryService configurationDiscoveryService = ServiceManager.INSTANCE.findService( + ConfigurationDiscoveryService.class); + configurationDiscoveryService.registerAgentConfigChangeWatcher(traceSqlParametersWatcher); } @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, Object ret) throws Throwable { + if (ret != null && ret instanceof EnhancedInstance) { + ((EnhancedInstance) ret).setSkyWalkingDynamicField(URLParser.parser((String) allArguments[0])); + } return ret; }