Hopefully resolves https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7870 Jax-rs annotation instrumentation is only enabled when jax-rs api is found in the class loader. This check does a `ClassLoader.getResource` call for the resource name corresponding to class `javax.ws.rs.container.AsyncResponse`. As far as I understand this particular class is used only because it was added in jax-rs 2.0, any other class added in jax-rs 2.0 could be used instead of it. On openliberty we fail to find this class because it should be resolved through bundle dynamic imports but we disable looking into dynamic imports in https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/internal/internal-eclipse-osgi-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/osgi/EclipseOsgiInstrumentation.java when we do the class presence check. Using a class in `javax.ws.rs.core` package seems to work better as the import for that package is already resolved by the time we make the `getResource` call. |
||
---|---|---|
.. | ||
jaxrs-3.0-annotations/javaagent | ||
jaxrs-3.0-common | ||
jaxrs-3.0-jersey-3.0/javaagent | ||
jaxrs-3.0-resteasy-6.0/javaagent |