Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split akka actor instumentation #3173

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "(,)"
}
Comment on lines +10 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

testImplementation.exclude group: 'com.typesafe.akka', module: 'akka-actor_2.11'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ public AkkaActorInstrumentationModule() {

@Override
public List<TypeInstrumentation> typeInstrumentations() {
return asList(
new AkkaForkJoinPoolInstrumentation(),
new AkkaForkJoinTaskInstrumentation(),
new AkkaDispatcherInstrumentation(),
new AkkaActorCellInstrumentation());
}

@Override
protected boolean defaultEnabled() {
return false;
return asList(new AkkaDispatcherInstrumentation(), new AkkaActorCellInstrumentation());
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
@@ -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<TypeInstrumentation> typeInstrumentations() {
return asList(new AkkaForkJoinPoolInstrumentation(), new AkkaForkJoinTaskInstrumentation());
}
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down