1
我正在用akka框架(特别是版本2.3)开发一个java应用程序。 我需要在运行时监视我的工作演员。更确切地说,我需要获得演员的邮箱大小/工作演员的数量等。Kamon:Aspectjweaver失踪
我选择了Kamon framework,并试图将它连接到我的应用程序,但面临问题。我根据文档做了一切。
正如他们说在他们的网站
添加卡蒙,JMX的依赖到项目,并确保它在 你的classpath在运行时,仅此而已。 Kamon的模块加载器将 检测到JMX模块在类路径中并自动启动 它。
好的。我加卡蒙,阿卡,卡蒙,JMX,卡蒙核心依赖(所有的人都0.6.7版本),添加一行代码,在我的主要方法:
public static void main(String[] args) {
Kamon.start();
.....
}
我在压制运行
___ _ ___ _ _ ___ ___ _ _
/_ \ | | |_ | | | | | | \/ |(_) (_)
//_\ \ ___ _ __ ___ ___ | |_ | | | | | | ___ __ _ __ __ ___ _ __ | . . | _ ___ ___ _ _ __ __ _
| _ |/ __|| '_ \/_ \/__|| __| | | | |/\| |/_ \/_` |\ \/// _ \| '__| | |\/| || |/ __|/ __|| || '_ \/_` |
| | | |\__ \| |_) || __/| (__ | |_ /\__//\ /\ /| __/| (_| | \ 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.
我已经尝试了所有的以下内容::
- 将卡蒙-autoweaver到去我的IDE然后我在我的控制台得到这个消息pendencies部分
- 传入javaagent参数我的应用程序: 的java -javaagent:〜/ .aspectj/AspectJ的weaver.jar我-app.jar
但结果是一样的:AspectJWeaver失踪。
这不是一个真正的解决方案,对吧? – StephenKing
@StephenKing当然,这是使事情顺利进行的临时解决方案。 – rnknown