diff --git a/build.sbt b/build.sbt index f9ae0bfee..a69dc4b5a 100644 --- a/build.sbt +++ b/build.sbt @@ -498,7 +498,7 @@ lazy val `kamon-pekko` = (project in file("instrumentation/kamon-pekko")) .disablePlugins(AssemblyPlugin) .settings(instrumentationSettings: _*) .settings(Seq( - crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`), + crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version), libraryDependencies ++= Seq( "org.apache.pekko" %% "pekko-actor" % pekkoHttpVersion % "provided" ) @@ -515,7 +515,7 @@ lazy val `kamon-pekko-http` = (project in file("instrumentation/kamon-pekko-http .disablePlugins(AssemblyPlugin) .settings(instrumentationSettings) .settings(Seq( - crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`), + crossScalaVersions := Seq(`scala_2.12_version`, `scala_2.13_version`, scala_3_version), libraryDependencies ++= Seq( kanelaAgent % "provided", "org.apache.pekko" %% "pekko-http" % pekkoHttpVersion % "provided", diff --git a/instrumentation/kamon-akka/src/common/scala/kamon/instrumentation/akka/instrumentations/ActorInstrumentation.scala b/instrumentation/kamon-akka/src/common/scala/kamon/instrumentation/akka/instrumentations/ActorInstrumentation.scala index 05945fefb..365075d54 100644 --- a/instrumentation/kamon-akka/src/common/scala/kamon/instrumentation/akka/instrumentations/ActorInstrumentation.scala +++ b/instrumentation/kamon-akka/src/common/scala/kamon/instrumentation/akka/instrumentations/ActorInstrumentation.scala @@ -28,9 +28,6 @@ import kanela.agent.libs.net.bytebuddy.asm.Advice.{Argument, OnMethodEnter, OnMe class ActorInstrumentation extends InstrumentationBuilder { - onType("akka.actor.dungeon.Dispatch") - .advise(method("sendMessage").and(takesArguments(1)), SendMessageAdvice) - /** * This is where most of the Actor processing magic happens. Handling of messages, errors and system messages. */ @@ -40,6 +37,7 @@ class ActorInstrumentation extends InstrumentationBuilder { .advise(method("invoke"), classOf[ActorCellInvokeAdvice]) .advise(method("handleInvokeFailure"), HandleInvokeFailureMethodAdvice) .advise(method("terminate"), TerminateMethodAdvice) + .advise(method("sendMessage").and(takesArguments(1)), SendMessageAdvice) .advise(method("swapMailbox"), ActorCellSwapMailboxAdvice) .advise(method("invokeAll$1"), InvokeAllMethodInterceptor) diff --git a/instrumentation/kamon-akka/src/test-common/scala/kamon/instrumentation/akka/MessageTracingSpec.scala b/instrumentation/kamon-akka/src/test-common/scala/kamon/instrumentation/akka/MessageTracingSpec.scala index 3790d9afb..c8162e2c7 100644 --- a/instrumentation/kamon-akka/src/test-common/scala/kamon/instrumentation/akka/MessageTracingSpec.scala +++ b/instrumentation/kamon-akka/src/test-common/scala/kamon/instrumentation/akka/MessageTracingSpec.scala @@ -222,7 +222,7 @@ class TracingTestActor extends Actor { } class ActorWithMaterializer extends Actor { - implicit val mat: Materializer = Materializer(context) + implicit val mat: Materializer = ActorMaterializer() override def receive: Receive = { case "stream" =>