diff options
author | Ivan Topolnak <itopolnak@despegar.com> | 2014-02-03 18:10:08 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-02-04 09:18:08 -0300 |
commit | 5d296a16270b1ec66d206ef1195208ea864f49c1 (patch) | |
tree | 03d71af983c7737234a13695bef0bf97cf5e4411 /kamon-core/src/main/scala/akka | |
parent | 9534d698ccf7e7c368db5e896abdb5d13ce27a48 (diff) | |
download | Kamon-5d296a16270b1ec66d206ef1195208ea864f49c1.tar.gz Kamon-5d296a16270b1ec66d206ef1195208ea864f49c1.tar.bz2 Kamon-5d296a16270b1ec66d206ef1195208ea864f49c1.zip |
create the notion of a metric group category for easier filtering when subscribing
Diffstat (limited to 'kamon-core/src/main/scala/akka')
-rw-r--r-- | kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala b/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala index 199b2bb2..6762fb10 100644 --- a/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala +++ b/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala @@ -27,7 +27,7 @@ import kamon.metrics.ActorMetrics.ActorMetricRecorder @Aspect("perthis(actorCellCreation(*, *, *, *, *))") class BehaviourInvokeTracing { - var path: String = _ + var metricIdentity: ActorMetrics = _ var actorMetrics: Option[ActorMetricRecorder] = None @Pointcut("execution(akka.actor.ActorCell.new(..)) && args(system, ref, props, dispatcher, parent)") @@ -37,8 +37,8 @@ class BehaviourInvokeTracing { def afterCreation(system: ActorSystem, ref: ActorRef, props: Props, dispatcher: MessageDispatcher, parent: ActorRef): Unit = { val metricsExtension = Kamon(Metrics)(system) - path = ref.path.elements.mkString("/") - actorMetrics = metricsExtension.register(path, ActorMetrics) + metricIdentity = ActorMetrics(ref.path.elements.mkString("/")) + actorMetrics = metricsExtension.register(metricIdentity, ActorMetrics.Factory) } @Pointcut("(execution(* akka.actor.ActorCell.invoke(*)) || execution(* akka.routing.RoutedActorCell.sendMessage(*))) && this(cell) && args(envelope)") @@ -65,7 +65,7 @@ class BehaviourInvokeTracing { @After("actorStop(cell)") def afterStop(cell: Cell): Unit = { - actorMetrics.map(p ⇒ Kamon(Metrics)(cell.system).unregister(path, ActorMetrics)) + actorMetrics.map(p ⇒ Kamon(Metrics)(cell.system).unregister(metricIdentity)) } } |