Skip to content

lucidsoftware/otel-jdbc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTracing for JDBC

Build Status Maven Version

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)

About

Connection wrapper for JDBC to trace with OpenTelemetry

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 73.9%
  • Scala 19.8%
  • Shell 6.3%