Move eclipse-osgi instrumentation to internal
RENAME
instrumentation/eclipse-osgi-3.6/javaagent/eclipse-osgi-3.6-javaagent.gradle
instrumentation/internal/internal-eclipse-osgi-3.6/javaagent/internal-eclipse-osgi-3.6-javaagent.gradle
RENAME
instrumentation/eclipse-osgi-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/osgi/EclipseOsgiInstrumentationModule.java
instrumentation/internal/internal-eclipse-osgi-3.6/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/internal/osgi/EclipseOsgiInstrumentationModule.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.javaagent.instrumentation.osgi;
+package io.opentelemetry.javaagent.instrumentation.internal.osgi;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
@@ -34,7 +34,7 @@ import net.bytebuddy.matcher.ElementMatcher;
@AutoService(InstrumentationModule.class)
public class EclipseOsgiInstrumentationModule extends InstrumentationModule {
public EclipseOsgiInstrumentationModule() {
- super("eclipse-osgi");
+ super("internal-eclipse-osgi");
}
@Override

MODIFY
javaagent-api/src/main/java/io/opentelemetry/javaagent/instrumentation/api/internal/InClassLoaderMatcher.java
javaagent-api/src/main/java/io/opentelemetry/javaagent/instrumentation/api/internal/InClassLoaderMatcher.java
@@ -15,9 +15,9 @@ public final class InClassLoaderMatcher {
/**
* Returns whether the ClassLoaderMatcher is currently executing.
*
- * <p>This is used (at least) by the {@code eclipse-osgi} instrumentation in order to suppress a
- * side effect in the Eclipse OSGi class loader that occurs when ClassLoaderMatcher calls
- * ClassLoader.getResource(). See {@code EclipseOsgiInstrumentationModule} for more details.
+ * <p>This is used (at least) by the {@code internal-eclipse-osgi} instrumentation in order to
+ * suppress a side effect in the Eclipse OSGi class loader that occurs when ClassLoaderMatcher
+ * calls ClassLoader.getResource(). See {@code EclipseOsgiInstrumentationModule} for more details.
*/
public static boolean get() {
return inClassLoaderMatcher.get().value;

MODIFY
settings.gradle
settings.gradle
@@ -86,6 +86,7 @@ include ':instrumentation:cassandra:cassandra-3.0:javaagent'
include ':instrumentation:cassandra:cassandra-4.0:javaagent'
include ':instrumentation:cdi-testing'
include ':instrumentation:internal:internal-class-loader:javaagent'
+include ':instrumentation:internal:internal-eclipse-osgi-3.6:javaagent'
include ':instrumentation:internal:internal-proxy:javaagent'
include ':instrumentation:internal:internal-proxy:javaagent-unit-tests'
include ':instrumentation:internal:internal-url-class-loader:javaagent'
@@ -97,7 +98,6 @@ include ':instrumentation:couchbase:couchbase-3.1:javaagent'
include ':instrumentation:couchbase:couchbase-testing'
include ':instrumentation:dropwizard-views-0.7:javaagent'
include ':instrumentation:dropwizard-testing'
-include ':instrumentation:eclipse-osgi-3.6:javaagent'
include ':instrumentation:elasticsearch:elasticsearch-rest-common:library'
include ':instrumentation:elasticsearch:elasticsearch-rest-5.0:javaagent'
include ':instrumentation:elasticsearch:elasticsearch-rest-6.4:javaagent'

MODIFY
testing/agent-exporter/agent-exporter.gradle
testing/agent-exporter/agent-exporter.gradle
@@ -25,6 +25,7 @@ dependencies {
// FIXME: we should enable this, but currently this fails tests for google http client
//testImplementation project(':instrumentation:http-url-connection:javaagent')
implementation project(':instrumentation:internal:internal-class-loader:javaagent')
+ implementation project(':instrumentation:internal:internal-eclipse-osgi-3.6:javaagent')
implementation project(':instrumentation:internal:internal-proxy:javaagent')
implementation project(':instrumentation:internal:internal-url-class-loader:javaagent')

Move eclipse-osgi instrumentation to internal (#2832)