I'm developing a java application with help of akka framework (version 2.3 especially). And I need to monitor my working actors in runtime. More precisely I need to get actors mailbox size / count of working actors etc.
I choosed Kamon framework and tried to connect it to my application but faced with problem. I did everything according to the documentation.
As they said on their web-site
Add the kamon-jmx dependency to your project and ensure that it is in your classpath at runtime, that’s it. Kamon’s module loader will detect that the JMX module is in the classpath and automatically start it.
Ok. I added kamon-akka, kamon-jmx, kamon-core dependencies (all of them are 0.6.7 version), added one line of code in my main method:
public static void main(String[] args) {
Kamon.start();
.....
}
I pressed run in my IDE and then I've got this message in my console:
___ _ ___ _ _ ___ ___ _ _
/ _ \ | | |_ | | | | | | \/ |(_) (_)
/ /_\ \ ___ _ __ ___ ___ | |_ | | | | | | ___ __ _ __ __ ___ _ __ | . . | _ ___ ___ _ _ __ __ _
| _ |/ __|| '_ \ / _ \ / __|| __| | | | |/\| | / _ \ / _` |\ \ / // _ \| '__| | |\/| || |/ __|/ __|| || '_ \ / _` |
| | | |\__ \| |_) || __/| (__ | |_ /\__/ / \ /\ /| __/| (_| | \ V /| __/| | | | | || |\__ \\__ \| || | | || (_| |
\_| |_/|___/| .__/ \___| \___| \__|\____/ \/ \/ \___| \__,_| \_/ \___||_| \_| |_/|_||___/|___/|_||_| |_| \__, |
| | __/ |
|_| |___/
It seems like your application was not started with the -javaagent:/path-to-aspectj-weaver.jar option but Kamon detected
the following modules which require AspectJ to work properly:
kamon-akka, kamon-scala, kamon-play
If you need help on setting up the aspectj weaver go to http://kamon.io/introduction/get-started/ for more info. On the
other hand, if you are sure that you do not need or do not want to use the weaver then you can disable this error message
by changing the kamon.show-aspectj-missing-warning setting in your configuration file.
I've tried all of the following:
- adding kamon-autoweaver to the dependencies section
- passing in the javaagent argument to my application: java -javaagent:~/.aspectj/aspectj-weaver.jar my-app.jar
But result is the same: AspectJWeaver missing.
Solved this problem by changing kamon-akka, kamon-core versions to 0.5.2 and exporting metrics to StatsD instead of JMX.