opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Make OpenTelemetry-API Bridge and dependent instrumentations work with indy
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?