[fix] In the higher version of mysql-connector-java 8x, there is an error in the value of db.instance. (#427)

This commit is contained in:
lvxiao 2022-12-23 13:09:52 +08:00 committed by GitHub
parent 80ff07b577
commit 37a880e903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -19,6 +19,7 @@ Release Notes.
* Add [Micrometer Observation](https://github.com/micrometer-metrics/micrometer/) support
* Add tags `mq.message.keys` and `mq.message.tags` for RocketMQ producer span
* Clean the trace context which injected into Pulsar MessageImpl after the instance recycled
* Fix In the higher version of mysql-connector-java 8x, there is an error in the value of db.instance.
#### Documentation

View File

@ -115,6 +115,22 @@ public class ConnectionInstrumentation extends AbstractMysqlInstrumentation {
return org.apache.skywalking.apm.plugin.jdbc.mysql.Constants.SET_CATALOG_INTERCEPTOR;
}
@Override
public boolean isOverrideArgs() {
return false;
}
},
new InstanceMethodsInterceptPoint() {
@Override
public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("setDatabase");
}
@Override
public String getMethodsInterceptor() {
return org.apache.skywalking.apm.plugin.jdbc.mysql.Constants.SET_CATALOG_INTERCEPTOR;
}
@Override
public boolean isOverrideArgs() {
return false;