diff --git a/src/main/scala/com/evolutiongaming/cluster/AdaptiveAllocationStrategy.scala b/src/main/scala/com/evolutiongaming/cluster/AdaptiveAllocationStrategy.scala index fe6f4f9..f656d14 100644 --- a/src/main/scala/com/evolutiongaming/cluster/AdaptiveAllocationStrategy.scala +++ b/src/main/scala/com/evolutiongaming/cluster/AdaptiveAllocationStrategy.scala @@ -55,8 +55,11 @@ class AdaptiveAllocationStrategy( override def extractShardId(numberOfShards: Int): ShardRegion.ExtractShardId = { case x: ClusterMsg => if (!x.isInstanceOf[PersistenceQuery]) { - increment(typeName, x.id) - metricRegistry.meter(s"persistence.$typeName.sender.${x.id}.$selfHost").mark() + if (!x.isInstanceOf[DoNotCount]) { + increment(typeName, x.id) + metricRegistry.meter(s"persistence.$typeName.sender.${ x.id }.$selfHost").mark() + } + metricRegistry.meter(s"persistence.$typeName.command.${ x.id }.${x.getClass.getCanonicalName}.$selfHost").mark() } x.id } diff --git a/src/main/scala/com/evolutiongaming/cluster/DoNotCount.scala b/src/main/scala/com/evolutiongaming/cluster/DoNotCount.scala new file mode 100644 index 0000000..6c86722 --- /dev/null +++ b/src/main/scala/com/evolutiongaming/cluster/DoNotCount.scala @@ -0,0 +1,3 @@ +package com.evolutiongaming.cluster + +trait DoNotCount \ No newline at end of file