eigengo / monitor

Library for monitoring the Typesafe stack-based applications.
Apache License 2.0
127 stars 24 forks source link

Dispatcher monitoring #92

Closed janm399 closed 11 years ago

janm399 commented 11 years ago

Do not merge yet, this is just for initial discussion.

This PR contains code that watches the thread pools for the different dispatchers in an actor system. This is particularly useful if some of the dispatchers wrap around a lot of blocking calls.

It introduces several new aspects:

The aspects are tagged with the actor paths, types, and two new tags in form of: akka.system:$SYSTEM_NAME, and akka.dispatcher:$DISPATCHER_ID, where $SYSTEM_NAME is the ActorSystem's name, and $DISPATCHER_ID is the Akka Dispatcher id.

See http://doc.akka.io/docs/akka/snapshot/scala/dispatchers.html for dispatcher configuration and further discussion of the dispatchers.

Note that this is a brand new aspect DispatcherMonitoringAspect, which should be included in the META-INF/aop.xml configuration file to see it working. See the aop.xml file in example-akka for default settings.