lpcy commented on a change in pull request #18:
URL: https://github.com/apache/skywalking-java/pull/18#discussion_r701571548
##########
File path:
apm-sniffer/apm-sdk-plugin/mysql-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/v6/ConnectionCreateOldInterceptor.java
##########
@@ -41,7 +41,12 @@ public void beforeMethod(Class clazz, Method method,
Object[] allArguments, Clas
public Object afterMethod(Class clazz, Method method, Object[]
allArguments, Class<?>[] parameterTypes,
Object ret) {
if (ret instanceof EnhancedInstance) {
- ConnectionInfo connectionInfo =
ConnectionCache.get(allArguments[1].toString(), allArguments[2].toString());
+ String database = "";
+ try {
+ Method getDbMethod =
parameterTypes[0].getDeclaredMethod("getDatabase");
+ database = (String) getDbMethod.invoke(allArguments[0]);
+ } catch (Throwable t) { }
Review comment:
There are two Interceptor for two mysql-connector-java version in one
plugin.My point is how to add two mysql-connector-java version dependencies for
use the target type directly and separately.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]