Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

ocjdbc-alive

Compare
Choose a tag to compare
@odeke-em odeke-em released this 25 Sep 20:35
· 35 commits to master since this release
6e1f63a

OCJDBC -- OpenCensus Java Database Connectivity is a wrapper to add observability with tracing and metrics from OpenCensus to your JDBC connections.

Using it simply requires:

Dependency

  • Using Maven
<dependency>
    <groupId>io.opencensus</groupId>
    <artifactId>ocjdbc</artifactId>
    <version>0.0.1</version>
</dependency>

In code

import io.opencensus.ocjdbc.Connection;
import io.opencensus.ocjdbc.Observability;

public static void main(String ...args) {
    // Then create/wrap it with the instrumented Connection from "io.opencensus.ocjdbc".
    java.sql.Connection conn = new Connection(originalConn);
}

and then add the various OpenCensus exporters. Please take a look at https://opencensus.io/guides/integrations/sql/