opentelemetry-java-instrume.../instrumentation/oracle-ucp-11.2/library
Trask Stalnaker 71b3e3e027
Library doc cleanup (#6948)
Related to #6947, but just cleans up the library module doc that already
existed (mostly for uniformity). Does not introduce any new doc.
2022-10-24 10:26:21 -07:00
..
src Use metrics batch API in connection pool instrumentations (#6231) 2022-07-05 13:47:15 +02:00
README.md Library doc cleanup (#6948) 2022-10-24 10:26:21 -07:00
build.gradle.kts Implement Oracle UCP connection pool metrics (#6099) 2022-06-02 22:47:04 -07:00

README.md

Library Instrumentation for Oracle UCP version 11.2 and higher

Provides OpenTelemetry instrumentation for Oracle UCP.

Quickstart

Add these dependencies to your project:

Replace OPENTELEMETRY_VERSION with the latest release.

For Maven, add to your pom.xml dependencies:

<dependencies>
  <dependency>
    <groupId>io.opentelemetry.instrumentation</groupId>
    <artifactId>opentelemetry-oracle-ucp-11.2</artifactId>
    <version>OPENTELEMETRY_VERSION</version>
  </dependency>
</dependencies>

For Gradle, add to your dependencies:

implementation("io.opentelemetry.instrumentation:opentelemetry-oracle-ucp-11.2:OPENTELEMETRY_VERSION")

Usage

The instrumentation library allows registering UniversalConnectionPool instances for collecting OpenTelemetry-based metrics.

OracleUcpTelemetry oracleUcpTelemetry;

void configure(OpenTelemetry openTelemetry, UniversalConnectionPool universalConnectionPool) {
  oracleUcpTelemetry = OracleUcpTelemetry.create(openTelemetry);
  oracleUcpTelemetry.registerMetrics(universalConnectionPool);
}

void destroy(UniversalConnectionPool universalConnectionPool) {
  oracleUcpTelemetry.unregisterMetrics(universalConnectionPool);
}