Internal instrumentations should always be enabled by default
MODIFY
instrumentation/internal/internal-class-loader/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/classloader/ClassLoaderInstrumentationModule.java
instrumentation/internal/internal-class-loader/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/classloader/ClassLoaderInstrumentationModule.java
@@ -18,6 +18,12 @@ public class ClassLoaderInstrumentationModule extends InstrumentationModule {
super("internal-class-loader");
}
+ @Override
+ public boolean defaultEnabled() {
+ // internal instrumentations are always enabled by default
+ return true;
+ }
+
@Override
public boolean isHelperClass(String className) {
return className.equals("io.opentelemetry.javaagent.tooling.Constants");

MODIFY
instrumentation/internal/internal-eclipse-osgi-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/osgi/EclipseOsgiInstrumentationModule.java
instrumentation/internal/internal-eclipse-osgi-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/osgi/EclipseOsgiInstrumentationModule.java
@@ -18,6 +18,12 @@ public class EclipseOsgiInstrumentationModule extends InstrumentationModule {
super("internal-eclipse-osgi");
}
+ @Override
+ public boolean defaultEnabled() {
+ // internal instrumentations are always enabled by default
+ return true;
+ }
+
@Override
public List<TypeInstrumentation> typeInstrumentations() {
return singletonList(new EclipseOsgiInstrumentation());

MODIFY
instrumentation/internal/internal-proxy/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/proxy/ProxyInstrumentationModule.java
instrumentation/internal/internal-proxy/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/proxy/ProxyInstrumentationModule.java
@@ -18,6 +18,12 @@ public class ProxyInstrumentationModule extends InstrumentationModule {
super("internal-proxy");
}
+ @Override
+ public boolean defaultEnabled() {
+ // internal instrumentations are always enabled by default
+ return true;
+ }
+
@Override
public List<TypeInstrumentation> typeInstrumentations() {
return singletonList(new ProxyInstrumentation());

MODIFY
instrumentation/internal/internal-url-class-loader/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/urlclassloader/UrlClassLoaderInstrumentationModule.java
instrumentation/internal/internal-url-class-loader/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/urlclassloader/UrlClassLoaderInstrumentationModule.java
@@ -18,6 +18,12 @@ public class UrlClassLoaderInstrumentationModule extends InstrumentationModule {
super("internal-url-class-loader");
}
+ @Override
+ public boolean defaultEnabled() {
+ // internal instrumentations are always enabled by default
+ return true;
+ }
+
@Override
public List<TypeInstrumentation> typeInstrumentations() {
return singletonList(new UrlClassLoaderInstrumentation());

Internal instrumentations should always be enabled by default (#3257)