opentelemetry-java-instrumentation icon indicating copy to clipboard operation
opentelemetry-java-instrumentation copied to clipboard

Make OpenTelemetry-API Bridge and dependent instrumentations work with indy

Open JonasKunz opened this issue 8 months ago • 1 comments

Ensures that the OpenTelemetry API bridge works with -PtestIndy=true. Part of #11457. Effectively, this results in the bridge classes being loaded by the InstrumentationModuleClassloader instead of being injected into the application classloader. As a result, other instrumentations directly depending on those bridge classes (e.g. reactor) will need to be loaded by the same classloader.

This PR also adds a mechanism to hide packages present in the agent classloader for certain instrumentations. We'll eventually need to use this when we get rid of shading: Then the non-shaded agent opentelemetry-API needs to be hidden from the API-bridge instrumentation in order to link against the application Otel-API.

@open-telemetry/java-instrumentation-approvers : Could someone please add the testIndy label to this PR?

JonasKunz avatar Jun 13 '24 08:06 JonasKunz