Skip to content

Commit 2eefed9

Browse files
committed
remove ExecutionContextWrapper
1 parent b52921f commit 2eefed9

File tree

3 files changed

+4
-35
lines changed

3 files changed

+4
-35
lines changed

instrumentation/pekko/pekko-actor-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/ExecutionContextWrapper.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

instrumentation/pekko/pekko-actor-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/PekkoScheduleInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import net.bytebuddy.asm.Advice;
1616
import net.bytebuddy.description.type.TypeDescription;
1717
import net.bytebuddy.matcher.ElementMatcher;
18-
import scala.concurrent.ExecutionContext;
1918

2019
public class PekkoScheduleInstrumentation implements TypeInstrumentation {
2120

@@ -40,9 +39,9 @@ public static class ScheduleAdvice {
4039

4140
@Advice.OnMethodEnter(suppress = Throwable.class)
4241
public static void enterSchedule(
43-
@Advice.Argument(value = 3, readOnly = false) ExecutionContext executionContext) {
42+
@Advice.Argument(value = 2, readOnly = false) Runnable runnable) {
4443
Context context = Java8BytecodeBridge.currentContext();
45-
executionContext = new ExecutionContextWrapper(executionContext, context);
44+
runnable = context.wrap(runnable);
4645
}
4746
}
4847
}

instrumentation/pekko/pekko-actor-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/pekkoactor/v1_0/PekkoScheduleOnceInstrumentation.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import net.bytebuddy.asm.Advice;
1616
import net.bytebuddy.description.type.TypeDescription;
1717
import net.bytebuddy.matcher.ElementMatcher;
18-
import scala.concurrent.ExecutionContext;
1918

2019
public class PekkoScheduleOnceInstrumentation implements TypeInstrumentation {
2120

@@ -39,9 +38,9 @@ public static class ScheduleOnceAdvice {
3938

4039
@Advice.OnMethodEnter(suppress = Throwable.class)
4140
public static void enterScheduleOnce(
42-
@Advice.Argument(value = 2, readOnly = false) ExecutionContext executionContext) {
41+
@Advice.Argument(value = 1, readOnly = false) Runnable runnable) {
4342
Context context = Java8BytecodeBridge.currentContext();
44-
executionContext = new ExecutionContextWrapper(executionContext, context);
43+
runnable = context.wrap(runnable);
4544
}
4645
}
4746
}

0 commit comments

Comments
 (0)