Skip to content

Commit

Permalink
Remove obsolete build step in agroal
Browse files Browse the repository at this point in the history
Removing work around step now that
open-telemetry/opentelemetry-java-instrumentation#8080
is closed
  • Loading branch information
zakkak committed Jan 13, 2025
1 parent ec6bf3c commit f7bb668
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,29 +375,6 @@ HealthBuildItem addHealthCheck(Capabilities capabilities, DataSourcesBuildTimeCo
}
}

/**
* TODO: remove the step when https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8080 is closed
*/
@BuildStep
void adaptOpenTelemetryJdbcInstrumentationForNative(BuildProducer<RemovedResourceBuildItem> producer,
Capabilities capabilities) {
// remove 'JdbcSingletons' as it initialize OpenTelemetry at build time
// 'OpenTelemetryDriver' is removed as it is directly using 'JdbcSingletons'
// we also need to check for the driver presence at classpath as it is possible that both OpenTelemetry
// and Agroal extensions are used, but dependency 'opentelemetry-jdbc' is not present
if (capabilities.isPresent(OPENTELEMETRY_TRACER) && QuarkusClassLoader.isClassPresentAtRuntime(OPEN_TELEMETRY_DRIVER)) {
producer.produce(
new RemovedResourceBuildItem(ArtifactKey.fromString("io.opentelemetry.instrumentation:opentelemetry-jdbc"),
Set.of("META-INF/services/java.sql.Driver")));
producer.produce(
new RemovedResourceBuildItem(ArtifactKey.fromString("io.opentelemetry.instrumentation:opentelemetry-jdbc"),
Set.of("io/opentelemetry/instrumentation/jdbc/OpenTelemetryDriver")));
producer.produce(
new RemovedResourceBuildItem(ArtifactKey.fromString("io.opentelemetry.instrumentation:opentelemetry-jdbc"),
Set.of("io/opentelemetry/instrumentation.jdbc/internal/JdbcSingletons")));
}
}

@BuildStep
void registerRowSetSupport(
BuildProducer<NativeImageResourceBundleBuildItem> resourceBundleProducer,
Expand Down

0 comments on commit f7bb668

Please sign in to comment.