nl.grons.metrics.scala
Stackable actor trait which counts received messages.
Metric name defaults to the class of the actor (e.g. ExampleActor below) + .receiveCounter
ExampleActor
receiveCounter
Use it as follows:
object Application { // The application wide metrics registry. val metricRegistry = new com.codahale.metrics.MetricRegistry() } trait Instrumented extends InstrumentedBuilder { val metricRegistry = Application.metricRegistry } class ExampleActor extends Actor { def receive = { case _ => doWork() } } class InstrumentedExampleActor extends ExampleActor with ReceiveCounterActor with Instrumented
Stackable actor trait which counts received messages.
Metric name defaults to the class of the actor (e.g.
ExampleActor
below) + .receiveCounter
Use it as follows: