opentelemetry-java-instrume.../instrumentation/oracle-ucp-11.2/library
Lauri Tulmin ec0223de59
Fix instrumentation for the latest version of ucp (#12052)
2024-08-20 12:11:24 -07:00
..
src Rename the `instrumentation-api-semconv` module into `instrumentation-api-incubator` (#9985) 2023-12-04 08:28:10 +01:00
README.md Introduce markdown lint check (#7175) 2022-11-16 20:48:42 -08:00
build.gradle.kts Fix instrumentation for the latest version of ucp (#12052) 2024-08-20 12:11:24 -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);
}