2017-10-08 87 views
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失蹤。

回答

0

通過改變卡蒙 - 阿卡卡蒙核心版本0.5.2和出口指標,以StatsD而不是JMX解決了這個問題。

+0

這不是一個真正的解決方案,對吧? – StephenKing

+0

@StephenKing當然,這是使事情順利進行的臨時解決方案。 – rnknown