Skip to content

Commit d4d2a40

Browse files
committed
remove unneeded var and fix disable method
1 parent 9de8b90 commit d4d2a40

File tree

3 files changed

+3
-21
lines changed
  • instrumentation/rxjava

3 files changed

+3
-21
lines changed

instrumentation/rxjava/rxjava-2.0/library/src/main/java/io/opentelemetry/instrumentation/rxjava/v2_0/TracingAssembly.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ public final class TracingAssembly {
9393
private static Function<? super ParallelFlowable, ? extends ParallelFlowable>
9494
oldOnParallelAssembly;
9595

96-
@SuppressWarnings("rawtypes")
97-
@GuardedBy("TracingAssembly.class")
98-
@Nullable
99-
private static Function<? super Observable, ? extends Observable> oldOnObservableAssembly;
100-
10196
@GuardedBy("TracingAssembly.class")
10297
private static boolean enabled;
10398

@@ -298,8 +293,7 @@ private static void disableObservable() {
298293

299294
@GuardedBy("TracingAssembly.class")
300295
private static void disableObservableAssembly() {
301-
RxJavaPlugins.setOnObservableAssembly(oldOnObservableAssembly);
302-
oldOnObservableAssembly = null;
296+
RxJavaPlugins.setScheduleHandler(null);
303297
}
304298

305299
@GuardedBy("TracingAssembly.class")

instrumentation/rxjava/rxjava-3.0/library/src/main/java/io/opentelemetry/instrumentation/rxjava/v3_0/TracingAssembly.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ public final class TracingAssembly {
6666
private static BiFunction<? super Observable, ? super Observer, ? extends Observer>
6767
oldOnObservableSubscribe;
6868

69-
@SuppressWarnings("rawtypes")
70-
@GuardedBy("TracingAssembly.class")
71-
@Nullable
72-
private static Function<? super Observable, ? extends Observable> oldOnObservableAssembly;
73-
7469
@SuppressWarnings("rawtypes")
7570
@GuardedBy("TracingAssembly.class")
7671
@Nullable
@@ -300,8 +295,7 @@ private static void disableObservable() {
300295

301296
@GuardedBy("TracingAssembly.class")
302297
private static void disableObservableAssembly() {
303-
RxJavaPlugins.setOnObservableAssembly(oldOnObservableAssembly);
304-
oldOnObservableAssembly = null;
298+
RxJavaPlugins.setScheduleHandler(null);
305299
}
306300

307301
@GuardedBy("TracingAssembly.class")

instrumentation/rxjava/rxjava-3.1.1/library/src/main/java/io/opentelemetry/instrumentation/rxjava/v3_1_1/TracingAssembly.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ public final class TracingAssembly {
6666
private static BiFunction<? super Observable, ? super Observer, ? extends Observer>
6767
oldOnObservableSubscribe;
6868

69-
@SuppressWarnings("rawtypes")
70-
@GuardedBy("TracingAssembly.class")
71-
@Nullable
72-
private static Function<? super Observable, ? extends Observable> oldOnObservableAssembly;
73-
7469
@SuppressWarnings("rawtypes")
7570
@GuardedBy("TracingAssembly.class")
7671
@Nullable
@@ -300,8 +295,7 @@ private static void disableObservable() {
300295

301296
@GuardedBy("TracingAssembly.class")
302297
private static void disableObservableAssembly() {
303-
RxJavaPlugins.setOnObservableAssembly(oldOnObservableAssembly);
304-
oldOnObservableAssembly = null;
298+
RxJavaPlugins.setScheduleHandler(null);
305299
}
306300

307301
@GuardedBy("TracingAssembly.class")

0 commit comments

Comments
 (0)