open-telemetry / opentelemetry-java-instrumentation

OpenTelemetry auto-instrumentation and instrumentation libraries for Java
https://opentelemetry.io
Apache License 2.0
1.92k stars 839 forks source link

Indy module migration #11457

Open SylvainJuge opened 4 months ago

SylvainJuge commented 4 months ago

The following instrumentation modules currently override the io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule#isIndyModule and return false.

Each of them will need to be modified in order to become "indy compliant".

This is part of #8999

The #9508 PR provides a list of reasons why those instrumentations need to be manually modified, for reference this #9508 PR is also the one that introduced a toggle to test this dispatch implementation through modification of advice classes.

The PRs that are tagged "test indy" (list) will run with this automatic migration to "indy dispatch". The automatic transformation is provided by io.opentelemetry.javaagent.tooling.instrumentation.indy.AdviceTransformer ASM transformer.


Implementation proposal

This issue gather the steps to complete the 1st step of this "simple but tedious" plan:

  1. migrate the instrumentation listed above
  2. migrate all the instrumentations that are supported by AdviceTransformer
  3. remove AdviceTransformer and cleanup
SylvainJuge commented 3 months ago

Because the migration will take a while, I have documented the migration and some of the characteristics of the non-inlined advices in https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/11546

The summary is:

Once everything has been migrated, this issue can be closed and we can start the next steps which might look like the following (to be further discussed):