Another part of #932 In this PR I changed all the library instrumentation packages -- these are breaking changes, so I figured the earlier we do this the less painful it'll be to the users. I know that at least some of them are actively used, so we'll need to spell this out in the release notes. --------- Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> |
||
---|---|---|
.. | ||
src | ||
README.md | ||
build.gradle.kts |
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);
}