79801971

Date: 2025-10-27 15:19:42
Score: 1
Natty:
Report link

The issue with my earlier approach was that I was treating `DynaPathRecorder` as a **helper class**, when it is actually a **shared class**.

**Helper class:** A helper class is injected into the application classloader so that it can access all classes loaded by that classloader — and vice versa.

**Shared class:** A shared class is one that needs to be accessible across multiple classloaders. One way to achieve this, it should be loaded by the **boot classloader**.

In my previous setup, my `InstrumentationModule` implemented the `isHelperClass()` and `getAdditionalHelperClassNames()` methods, which marked `DynaPathRecorder` as a helper class. When the OpenTelemetry agent detected it as a helper, it injected it into the application classloader instead of delegating loading to the boot classloader.

In my updated setup, I removed the implementations of `isHelperClass()` and `getAdditionalHelperClassNames()`. As a result, the OpenTelemetry agent now delegates the loading of `DynaPathRecorder` to the boot classloader, which resolves the issue.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sri