eigengo / monitor

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

Actor type montoring #93

Closed hughsimpson closed 11 years ago

hughsimpson commented 11 years ago

Issue #89

This pr emulates the failure case, where an Actor is created via the japi.Creator interface and has no visible type during runtime. It provides a treatment of the case, and an associated test suite.

In addition, since the current assumption is that only implementations of that interface which return a 'generic' Actor class leave the actor type inaccessible during runtime, this pr also updates sampling and actor count so that we sample and count actors 'per type'. We still apply path filters (for sampling) to any cases this doesn't catch, and still record their actor count; however, we will count all remaining generic/anonymous actors as being of one type.

ActorCellMonitoringAspect is now final, because the reference hash maps it contains are non-static. This may implement a serious misunderstanding, and should be considered a potential bug.

If the number of untyped actors in a monitored system is generally non-zero, this indicates that there is another creation point for such generic actors we're still not catching, or actors we're catching that we shouldn't, and should be reported as a bug (or that there are 'race conditions' or other weirdness in the execution code and pointcut logic isn't enough, in which case it should be reported as a very difficult bug).

The failing TravisCI test 'CountFilteredActorCellMonitoringAspectSpec' is succeeding on one of my machines (iMac + OSX) but failing on my other (Thinkpad + Ubuntu), so I do have some traction on it now. May be the vdb...