diff options
author | Diego <diegolparra@gmail.com> | 2016-12-04 15:37:51 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2016-12-04 15:37:51 -0300 |
commit | 56039ef037d42cb817d0bc6d5a5891bc87e633c3 (patch) | |
tree | 711d36b49d69f7321ea75172d9d4969e318d7afe /kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala | |
parent | e02d137ab960676cb89ff597bc33915f8b83a4d2 (diff) | |
download | Kamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.tar.gz Kamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.tar.bz2 Kamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.zip |
wip
Diffstat (limited to 'kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala b/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala index 98d2ea0c..60612beb 100644 --- a/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala +++ b/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala @@ -16,7 +16,7 @@ package kamon.util.executors -import java.util.concurrent.{ ExecutorService, ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor } +import java.util.concurrent.{ExecutorService, ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor} import kamon.Kamon import kamon.metric.Entity @@ -49,7 +49,7 @@ object ExecutorServiceMetrics { * @param tags The tags associated to the [[ThreadPoolExecutor]] */ @inline private def registerThreadPool(name: String, threadPool: ThreadPoolExecutor, tags: Map[String, String]): Entity = { - val threadPoolEntity = Entity(name, Category, tags + ("executor-type" -> "thread-pool-executor")) + val threadPoolEntity = Entity(name, Category, tags + ("executor-type" → "thread-pool-executor")) Kamon.metrics.entity(ThreadPoolExecutorMetrics.factory(threadPool, Category), threadPoolEntity) threadPoolEntity } @@ -63,7 +63,7 @@ object ExecutorServiceMetrics { * @param tags The tags associated to the [[ForkJoinPool]] */ @inline private def registerScalaForkJoin(name: String, forkJoinPool: ForkJoinPool, tags: Map[String, String]): Entity = { - val forkJoinEntity = Entity(name, Category, tags + ("executor-type" -> "fork-join-pool")) + val forkJoinEntity = Entity(name, Category, tags + ("executor-type" → "fork-join-pool")) Kamon.metrics.entity(ForkJoinPoolMetrics.factory(forkJoinPool, Category), forkJoinEntity) forkJoinEntity } @@ -77,7 +77,7 @@ object ExecutorServiceMetrics { * @param tags The tags associated to the [[JavaForkJoinPool]] */ @inline private def registerJavaForkJoin(name: String, forkJoinPool: JavaForkJoinPool, tags: Map[String, String]): Entity = { - val forkJoinEntity = Entity(name, Category, tags + ("executor-type" -> "fork-join-pool")) + val forkJoinEntity = Entity(name, Category, tags + ("executor-type" → "fork-join-pool")) Kamon.metrics.entity(ForkJoinPoolMetrics.factory(forkJoinPool, Category), forkJoinEntity) forkJoinEntity } @@ -97,7 +97,7 @@ object ExecutorServiceMetrics { case delegatedExecutor: ExecutorService if delegatedExecutor.getClass.isAssignableFrom(DelegatedExecutor) ⇒ registerDelegatedExecutor(name, delegatedExecutor, tags) case delegatedScheduledExecutor: ExecutorService if delegatedScheduledExecutor.getClass.isAssignableFrom(DelegateScheduled) ⇒ registerDelegatedExecutor(name, delegatedScheduledExecutor, tags) case finalizableDelegatedExecutor: ExecutorService if finalizableDelegatedExecutor.getClass.isAssignableFrom(FinalizableDelegated) ⇒ registerDelegatedExecutor(name, finalizableDelegatedExecutor, tags) - case other ⇒ throw new NotSupportedException(s"The ExecutorService $name is not supported.") + case other ⇒ throw NotSupportedException(s"The ExecutorService $name is not supported.") } //Java variant |