scala - Akka - how to check how long a message was in inbox? -


how check in akka how long message in inbox? want make log message if message in inbox long. like:

override def receive: receive = {    case message =>       val timeininbox = ...       if (timeininbox > treshold) log.warn("bla bla bla doom coming") 

there metrics / telemetry libraries available can provide information. 1 kamon.io (open source), gives "time-in-mailbox" metric, see http://kamon.io/documentation/kamon-akka/0.6.6/actor-router-and-dispatcher-metrics/

another 1 (non-free, closed source) "lightbend telemetry", calls "mailbox time", see http://developer.lightbend.com/docs/monitoring/latest/instrumentations/akka/akka.html#actor-metrics


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -