This instrumentation creates spans for Statements and PreparedStatements. It also captures the corresponding SQL and additional connection info. ResultSet could be considered for future instrumentation to capture even more of the DB interaction time.
This integration uses Bytebuddy instead of Byteman as the many methods to instrument would have been messy in Byteman.
This is important for things like Spring Boot’s executable jar classloader which keeps all the jars individually rather than on the system classloader.