0

我在 Play 应用配置中包含以下内容:

atmos {
    trace {
        enabled = true               
        node = Node1               
    }
    send {
        warn = on
    }
}

我还将它添加到我的运行配置中:

-javaagent:lib/weaver/aspectjweaver.jar
-Djava.library.path=lib/hyperic-sigar-1.6.4/sigar-bin/lib
-Dorg.aspectj.tracing.factory=default

我已将"com.typesafe.atmos" % "trace-akka-2.2.0_2.10" % "1.2.1"(我使用的是 akka 2.2.0)包含在我的依赖项列表中。

当我在没有运行 atmos 的情况下运行我的 play 应用程序时,我收到一条关于没有接收器的警告。当我在后台启动 atmos 时,我没有收到此警告。通过打开 atmos 上的日志级别,我可以看到当我启动我的应用程序时它正在注册一些东西。但是,当我查看 typesafe-console ui 时,我看不到任何节点。

还有什么我想念的吗?

谢谢布赖恩

4

1 回答 1

2

Firstly the warning you receive about there being no receiver is there to inform you that you also need to start the Collector. The traced application offloads its traces via a socket to the Collector and if there is no such Collector running there won't be any statistics created either.

Now to answer your question not only do you need to enable tracing but you must also make sure that all actors are traced with the atmos.trace.traceable flag like this:

atmos {
  trace {
    enabled = true
      node = Node1
      traceable {
        "*" = on
      }
      sampling {
        "*" = 1
      }
      #...
    }
  }
}

Finally I would like to point out that there is a Google Group for the Typesafe Console should you have any more questions.

HTH Henrik

于 2013-08-23T07:58:46.140 回答