Skip to content

invokedynamic instrumentation by default for internal instrumentation #16813

@SylvainJuge

Description

@SylvainJuge

This is a sub-step of #13031

We have been testing invokedynamic instrumentation in CI for a while, and we need to make progress towards making it the default.

As discussed in 2026-01-22 Java SIG meeting, one of the first steps would be to start with internal instrumentation:

  • internal instrumentation have been tested with indy in CI for a while, most of it is already "indy ready" which means it runs inlined by default but can also use indy (opt-in)
  • we should not break compatibility with existing extensions and distributions : both can provide their own instrumentation modules.

The goals of this step would be to achieve the following:

  • migrate any remaining indy-incompatible internal instrumentation to be indy-compatible.
  • make InstrumentationModule.isIndyModule() return true for all internal instrumentation modules and make them use inline = false whenever possible
  • remove usages of the isIndyReady method in ExperimentalInstrumentationModule for all internal instrumentation modules.

Implementation steps

Once this is complete, all internal instrumentation modules are "indy native":

  • they should always use indy
  • they are no longer influenced by the otel.javaagent.experimental.indy configuration option
  • there is no advice transformation applied: it is no longer necessary to modify "indy ready" instrumentation to use inline = false

Notes

  • there are a few internal instrumentations that still require to NOT have inline = false because they are inlined, which means for now inline = false is technically optional but should be used most of the time.
  • the otel.javaagent.experimental.indy configuration option would still be useful for testing extensions and distributions compatibility with indy.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions