Convert rxjava-1.0 into library
MODIFY
instrumentation/couchbase/couchbase-2.0/couchbase-2.0.gradle
instrumentation/couchbase/couchbase-2.0/couchbase-2.0.gradle
@@ -26,7 +26,7 @@ muzzle {
}
dependencies {
- implementation project(':instrumentation:rxjava-1.0')
+ implementation project(':instrumentation:rxjava-1.0:library')
library group: 'com.couchbase.client', name: 'java-client', version: '2.0.0'

MODIFY
instrumentation/couchbase/couchbase-2.0/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseInstrumentationModule.java
instrumentation/couchbase/couchbase-2.0/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseInstrumentationModule.java
@@ -22,9 +22,9 @@ public class CouchbaseInstrumentationModule extends InstrumentationModule {
public String[] helperClassNames() {
return new String[] {
"rx.__OpenTelemetryTracingUtil",
- "io.opentelemetry.javaagent.instrumentation.rxjava.SpanFinishingSubscription",
- "io.opentelemetry.javaagent.instrumentation.rxjava.TracedSubscriber",
- "io.opentelemetry.javaagent.instrumentation.rxjava.TracedOnSubscribe",
+ "io.opentelemetry.instrumentation.rxjava.SpanFinishingSubscription",
+ "io.opentelemetry.instrumentation.rxjava.TracedSubscriber",
+ "io.opentelemetry.instrumentation.rxjava.TracedOnSubscribe",
packageName + ".CouchbaseClientTracer",
packageName + ".CouchbaseOnSubscribe",
packageName + ".CouchbaseQueryNormalizer"

MODIFY
instrumentation/couchbase/couchbase-2.0/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseOnSubscribe.java
instrumentation/couchbase/couchbase-2.0/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseOnSubscribe.java
@@ -10,8 +10,8 @@ import static io.opentelemetry.javaagent.instrumentation.couchbase.v2_0.Couchbas
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.attributes.SemanticAttributes;
+import io.opentelemetry.instrumentation.rxjava.TracedOnSubscribe;
import io.opentelemetry.javaagent.instrumentation.api.db.DbSystem;
-import io.opentelemetry.javaagent.instrumentation.rxjava.TracedOnSubscribe;
import java.lang.reflect.Method;
import rx.Observable;

MODIFY
instrumentation/couchbase/couchbase-2.6/couchbase-2.6.gradle
instrumentation/couchbase/couchbase-2.6/couchbase-2.6.gradle
@@ -17,7 +17,7 @@ muzzle {
}
dependencies {
- implementation project(':instrumentation:rxjava-1.0')
+ implementation project(':instrumentation:rxjava-1.0:library')
library group: 'com.couchbase.client', name: 'java-client', version: '2.6.0'

MODIFY
instrumentation/hystrix-1.4/hystrix-1.4.gradle
instrumentation/hystrix-1.4/hystrix-1.4.gradle
@@ -9,7 +9,7 @@ muzzle {
}
dependencies {
- implementation project(':instrumentation:rxjava-1.0')
+ implementation project(':instrumentation:rxjava-1.0:library')
library group: 'com.netflix.hystrix', name: 'hystrix-core', version: '1.4.0'
library group: 'io.reactivex', name: 'rxjava', version: '1.0.7'

MODIFY
instrumentation/hystrix-1.4/src/main/java/io/opentelemetry/javaagent/instrumentation/hystrix/HystrixInstrumentationModule.java
instrumentation/hystrix-1.4/src/main/java/io/opentelemetry/javaagent/instrumentation/hystrix/HystrixInstrumentationModule.java
@@ -17,7 +17,7 @@ import static net.bytebuddy.matcher.ElementMatchers.returns;
import com.google.auto.service.AutoService;
import com.netflix.hystrix.HystrixInvokableInfo;
import io.opentelemetry.api.trace.Span;
-import io.opentelemetry.javaagent.instrumentation.rxjava.TracedOnSubscribe;
+import io.opentelemetry.instrumentation.rxjava.TracedOnSubscribe;
import io.opentelemetry.javaagent.tooling.InstrumentationModule;
import io.opentelemetry.javaagent.tooling.TypeInstrumentation;
import java.util.HashMap;
@@ -42,9 +42,9 @@ public class HystrixInstrumentationModule extends InstrumentationModule {
public String[] helperClassNames() {
return new String[] {
"rx.__OpenTelemetryTracingUtil",
- "io.opentelemetry.javaagent.instrumentation.rxjava.SpanFinishingSubscription",
- "io.opentelemetry.javaagent.instrumentation.rxjava.TracedSubscriber",
- "io.opentelemetry.javaagent.instrumentation.rxjava.TracedOnSubscribe",
+ "io.opentelemetry.instrumentation.rxjava.SpanFinishingSubscription",
+ "io.opentelemetry.instrumentation.rxjava.TracedSubscriber",
+ "io.opentelemetry.instrumentation.rxjava.TracedOnSubscribe",
packageName + ".HystrixTracer",
getClass().getName() + "$HystrixOnSubscribe",
};

ADD
instrumentation/rxjava-1.0/library/rxjava-1.0-library.gradle
+apply from: "$rootDir/gradle/instrumentation-library.gradle"
+
+dependencies {
+ library group: 'io.reactivex', name: 'rxjava', version: '1.0.7'
+}

RENAME
instrumentation/rxjava-1.0/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/SpanFinishingSubscription.java
instrumentation/rxjava-1.0/library/src/main/java/io/opentelemetry/instrumentation/rxjava/SpanFinishingSubscription.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.javaagent.instrumentation.rxjava;
+package io.opentelemetry.instrumentation.rxjava;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Context;

RENAME
instrumentation/rxjava-1.0/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/TracedOnSubscribe.java
instrumentation/rxjava-1.0/library/src/main/java/io/opentelemetry/instrumentation/rxjava/TracedOnSubscribe.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.javaagent.instrumentation.rxjava;
+package io.opentelemetry.instrumentation.rxjava;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Context;

RENAME
instrumentation/rxjava-1.0/src/main/java/io/opentelemetry/javaagent/instrumentation/rxjava/TracedSubscriber.java
instrumentation/rxjava-1.0/library/src/main/java/io/opentelemetry/instrumentation/rxjava/TracedSubscriber.java
* SPDX-License-Identifier: Apache-2.0
*/
-package io.opentelemetry.javaagent.instrumentation.rxjava;
+package io.opentelemetry.instrumentation.rxjava;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Context;

RENAME
instrumentation/rxjava-1.0/src/main/java/rx/__OpenTelemetryTracingUtil.java
instrumentation/rxjava-1.0/library/src/main/java/rx/__OpenTelemetryTracingUtil.java
DELETE
instrumentation/rxjava-1.0/rxjava-1.0.gradle
-apply from: "$rootDir/gradle/instrumentation.gradle"
-
-dependencies {
- compileOnly group: 'io.reactivex', name: 'rxjava', version: '1.0.7'
-}

MODIFY
settings.gradle
settings.gradle
@@ -168,8 +168,7 @@ include ':instrumentation:rediscala-1.8'
include ':instrumentation:redisson-3.0'
include ':instrumentation:rmi'
include ':instrumentation:runtime-metrics:library'
-include ':instrumentation:rxjava-1.0'
-include ':instrumentation:rxjava-1.0'
+include ':instrumentation:rxjava-1.0:library'
include ':instrumentation:scala-executors'
include ':instrumentation:servlet:glassfish-testing'
include ':instrumentation:servlet:servlet-common'

Convert rxjava-1.0 into library (#1732)