OpenTracing for JDBC
Install
Published as the com.lucidchart:opentracing-jdbc
artifact.
Example
import io.opentracing.contrib.jdbc.*;
import java.net.InetAddress;
import java.nio.ByteBuffer;
// optionally include peer info
JdbcPeer peer = new JdbcPeer();
peer.name = "my_db";
peer.ipv4 = ByteBuffer.wrap(InetAddress.getByName("127.0.0.1").getAddress()).getInt();
peer.port = 3306;
// create a SpanConnectionWrapper
SpanConnectionWrapper wrapper = SpanConnectionWrapper.createDefault(peer);
// wrap Connections
Connection rawConnection = ...
Connection tracedConnection = wrapper.wrap(rawConnection)