diff --git a/instrumentation/akka-actor-2.5/javaagent/akka-actor-2.5-javaagent.gradle b/instrumentation/akka-actor-2.5/javaagent/akka-actor-2.5-javaagent.gradle index a05e59702c64..f7c46d9255de 100644 --- a/instrumentation/akka-actor-2.5/javaagent/akka-actor-2.5-javaagent.gradle +++ b/instrumentation/akka-actor-2.5/javaagent/akka-actor-2.5-javaagent.gradle @@ -7,16 +7,28 @@ muzzle { module = 'akka-actor_2.11' versions = "[2.5.0,)" } + pass { + group = 'com.typesafe.akka' + module = 'akka-actor_2.12' + versions = "[2.5.0,)" + } + pass { + group = 'com.typesafe.akka' + module = 'akka-actor_2.13' + versions = "(,)" + } } dependencies { - implementation project(':instrumentation:executors:javaagent') compileOnly "com.typesafe.akka:akka-actor_2.11:2.5.0" - - testImplementation "org.scala-lang:scala-library" testImplementation "com.typesafe.akka:akka-actor_2.11:2.5.0" + + latestDepTestLibrary "com.typesafe.akka:akka-actor_2.13:+" } -tasks.withType(Test).configureEach { - jvmArgs '-Dotel.instrumentation.akka-actor.enabled=true' +if (findProperty('testLatestDeps')) { + configurations { + // akka artifact name is different for regular and latest tests + testImplementation.exclude group: 'com.typesafe.akka', module: 'akka-actor_2.11' + } } \ No newline at end of file diff --git a/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorInstrumentationModule.java b/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorInstrumentationModule.java index 76f9085d624f..c5ba277254d2 100644 --- a/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorInstrumentationModule.java +++ b/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorInstrumentationModule.java @@ -20,15 +20,6 @@ public AkkaActorInstrumentationModule() { @Override public List typeInstrumentations() { - return asList( - new AkkaForkJoinPoolInstrumentation(), - new AkkaForkJoinTaskInstrumentation(), - new AkkaDispatcherInstrumentation(), - new AkkaActorCellInstrumentation()); - } - - @Override - protected boolean defaultEnabled() { - return false; + return asList(new AkkaDispatcherInstrumentation(), new AkkaActorCellInstrumentation()); } } diff --git a/instrumentation/akka-actor-fork-join-2.5/javaagent/akka-actor-fork-join-2.5-javaagent.gradle b/instrumentation/akka-actor-fork-join-2.5/javaagent/akka-actor-fork-join-2.5-javaagent.gradle new file mode 100644 index 000000000000..149e53c757d5 --- /dev/null +++ b/instrumentation/akka-actor-fork-join-2.5/javaagent/akka-actor-fork-join-2.5-javaagent.gradle @@ -0,0 +1,14 @@ +apply from: "$rootDir/gradle/instrumentation.gradle" +apply from: "$rootDir/gradle/test-with-scala.gradle" + +muzzle { + pass { + group = 'com.typesafe.akka' + module = 'akka-actor_2.11' + versions = "[2.5.0,)" + } +} + +dependencies { + library "com.typesafe.akka:akka-actor_2.11:2.5.0" +} diff --git a/instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorForkJoinInstrumentationModule.java b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorForkJoinInstrumentationModule.java new file mode 100644 index 000000000000..fa7552ae9cd0 --- /dev/null +++ b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaActorForkJoinInstrumentationModule.java @@ -0,0 +1,25 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.akkaactor; + +import static java.util.Arrays.asList; + +import com.google.auto.service.AutoService; +import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule; +import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; +import java.util.List; + +@AutoService(InstrumentationModule.class) +public class AkkaActorForkJoinInstrumentationModule extends InstrumentationModule { + public AkkaActorForkJoinInstrumentationModule() { + super("akka-actor", "akka-actor-fork-join", "akka-actor-2.5", "akka-actor-fork-join-2.5"); + } + + @Override + public List typeInstrumentations() { + return asList(new AkkaForkJoinPoolInstrumentation(), new AkkaForkJoinTaskInstrumentation()); + } +} diff --git a/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinPoolInstrumentation.java b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinPoolInstrumentation.java similarity index 100% rename from instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinPoolInstrumentation.java rename to instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinPoolInstrumentation.java diff --git a/instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinTaskInstrumentation.java b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinTaskInstrumentation.java similarity index 100% rename from instrumentation/akka-actor-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinTaskInstrumentation.java rename to instrumentation/akka-actor-fork-join-2.5/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkaactor/AkkaForkJoinTaskInstrumentation.java diff --git a/instrumentation/akka-actor-2.5/javaagent/src/test/groovy/AkkaExecutorInstrumentationTest.groovy b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/test/groovy/AkkaExecutorInstrumentationTest.groovy similarity index 100% rename from instrumentation/akka-actor-2.5/javaagent/src/test/groovy/AkkaExecutorInstrumentationTest.groovy rename to instrumentation/akka-actor-fork-join-2.5/javaagent/src/test/groovy/AkkaExecutorInstrumentationTest.groovy diff --git a/instrumentation/akka-actor-2.5/javaagent/src/test/java/AkkaAsyncChild.java b/instrumentation/akka-actor-fork-join-2.5/javaagent/src/test/java/AkkaAsyncChild.java similarity index 100% rename from instrumentation/akka-actor-2.5/javaagent/src/test/java/AkkaAsyncChild.java rename to instrumentation/akka-actor-fork-join-2.5/javaagent/src/test/java/AkkaAsyncChild.java diff --git a/settings.gradle b/settings.gradle index dbf1df73d4a9..c7c1e66a5e37 100644 --- a/settings.gradle +++ b/settings.gradle @@ -74,6 +74,7 @@ include ':testing-common:library-for-integration-tests' include ':smoke-tests' include ':instrumentation:akka-actor-2.5:javaagent' +include ':instrumentation:akka-actor-fork-join-2.5:javaagent' include ':instrumentation:akka-http-10.0:javaagent' include ':instrumentation:apache-camel-2.20:javaagent' include ':instrumentation:apache-camel-2.20:javaagent-unit-tests'