Stackable Actor trait which links Gauge life cycles with the actor life cycle.
Stackable actor trait which counts received messages.
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:
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 meters thrown exceptions.
Stackable actor trait which meters thrown exceptions.
Metric name defaults to the class of the actor (e.g. ExampleActor below) + .receiveExceptionMeter
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 times the message receipt.
Stackable actor trait which times the message receipt.
Metric name defaults to the class of the actor (e.g. ExampleActor below) + .receiveTimer
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 links Gauge life cycles with the actor life cycle.
When an actor is restarted, gauges can not be created again under the same name in the same metric registry. By mixing in this trait, all gauges created in this actor will be automatically unregistered before this actor restarts.
Use it as follows: