diff options
Diffstat (limited to 'kamon-akka/src/main/scala/kamon/akka/instrumentation')
-rw-r--r-- | kamon-akka/src/main/scala/kamon/akka/instrumentation/DispatcherInstrumentation.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kamon-akka/src/main/scala/kamon/akka/instrumentation/DispatcherInstrumentation.scala b/kamon-akka/src/main/scala/kamon/akka/instrumentation/DispatcherInstrumentation.scala index 0949df47..0d504343 100644 --- a/kamon-akka/src/main/scala/kamon/akka/instrumentation/DispatcherInstrumentation.scala +++ b/kamon-akka/src/main/scala/kamon/akka/instrumentation/DispatcherInstrumentation.scala @@ -19,7 +19,6 @@ package akka.kamon.instrumentation import java.util.concurrent.{ ExecutorService, ThreadPoolExecutor } import akka.actor.{ ActorContext, Props, ActorSystem, ActorSystemImpl } -import akka.dispatch.ForkJoinExecutorConfigurator.AkkaForkJoinPool import akka.dispatch._ import akka.kamon.instrumentation.LookupDataAware.LookupData import kamon.Kamon @@ -29,6 +28,8 @@ import kamon.metric.{ MetricsModule, Entity } import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.annotation._ +import scala.concurrent.forkjoin.ForkJoinPool + @Aspect class DispatcherInstrumentation { @@ -59,7 +60,7 @@ class DispatcherInstrumentation { private def registerDispatcher(dispatcherName: String, executorService: ExecutorService, system: ActorSystem): Unit = executorService match { - case fjp: AkkaForkJoinPool ⇒ + case fjp: ForkJoinPool ⇒ val dispatcherEntity = Entity(system.name + "/" + dispatcherName, AkkaDispatcherMetrics.Category, tags = Map("dispatcher-type" -> "fork-join-pool")) if (Kamon.metrics.shouldTrack(dispatcherEntity)) @@ -128,7 +129,7 @@ class DispatcherInstrumentation { if (lookupData.actorSystem != null) lazyExecutor.asInstanceOf[ExecutorServiceDelegate].executor match { - case fjp: AkkaForkJoinPool ⇒ + case fjp: ForkJoinPool ⇒ lookupData.metrics.removeEntity(Entity(lookupData.actorSystem.name + "/" + lookupData.dispatcherName, AkkaDispatcherMetrics.Category, tags = Map("dispatcher-type" -> "fork-join-pool"))) |