java.sql classes are not always present
MODIFY
dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/ConnectionInstrumentation.java
dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/ConnectionInstrumentation.java
@@ -43,7 +43,7 @@ public final class ConnectionInstrumentation extends Instrumenter.Default {
nameStartsWith("prepare")
.and(takesArgument(0, String.class))
// Also include CallableStatement, which is a sub type of PreparedStatement
- .and(returns(safeHasSuperType(named(PreparedStatement.class.getName())))),
+ .and(returns(safeHasSuperType(named("java.sql.PreparedStatement")))),
ConnectionPrepareAdvice.class.getName());
}

MODIFY
dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/DriverInstrumentation.java
dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/DriverInstrumentation.java
@@ -54,7 +54,7 @@ public final class DriverInstrumentation extends Instrumenter.Default {
nameStartsWith("connect")
.and(takesArgument(0, String.class))
.and(takesArgument(1, Properties.class))
- .and(returns(Connection.class)),
+ .and(returns(named("java.sql.Connection"))),
DriverAdvice.class.getName());
}

java.sql classes are not always present