opentelemetry-java-instrume.../instrumentation/jaxrs
Lauri Tulmin 64eb58633f
Fix jaxrs annotation instrumentation on openliberty (#7890)
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.
2023-02-24 13:00:11 +02:00
..
jaxrs-1.0/javaagent Update HTTP span name extractors (#7730) 2023-02-14 07:40:05 -08:00
jaxrs-2.0 Fix jaxrs annotation instrumentation on openliberty (#7890) 2023-02-24 13:00:11 +02:00
jaxrs-3.0 Fix jaxrs annotation instrumentation on openliberty (#7890) 2023-02-24 13:00:11 +02:00
jaxrs-common Update HTTP span name extractors (#7730) 2023-02-14 07:40:05 -08:00
README.md More spotless (#7126) 2022-11-11 05:01:21 +00:00

README.md

Settings for the Jaxrs instrumentation

System property Type Default Description
otel.instrumentation.jaxrs.experimental-span-attributes Boolean false Enable the capture of experimental span attributes.