我想使用 Java 代理将 Scala 应用程序(Kestrel,http: //robey.github.com/kestrel)与 NewRelic 集成,但因错误而失败
sh scripts/devel.sh
Starting kestrel in development mode...
Mar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Agent is using Logback
Mar 28, 2013 18:15:15 +0800 NewRelic 1 INFO: Loading configuration file "/tmp/newrelic.yml"
Mar 28, 2013 6:15:24 PM java.util.logging.LogManager$RootLogger log
FATAL: Error in config file: %s com.twitter.util.Eval$CompilerException: Compiler exception error: line 1: object twitter is not a member of package com
import com.twitter.conversions.storage._
^ at com.twitter.util.Eval$StringCompiler.apply(Eval.scala:533)
at com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:544)
at com.twitter.util.Eval$StringCompiler$$anonfun$apply$3.apply(Eval.scala:543)
at scala.Option.getOrElse(Option.scala:108)
at com.twitter.util.Eval$StringCompiler.apply(Eval.scala:543)
at com.twitter.util.Eval.applyProcessed(Eval.scala:196) at com.twitter.util.Eval.apply(Eval.scala:167) at com.twitter.ostrich.admin.RuntimeEnvironment.loadConfig(RuntimeEnvironment.scala:230)
at com.twitter.ostrich.admin.RuntimeEnvironment.loadRuntimeConfig(RuntimeEnvironment.scala:256)
at net.lag.kestrel.Kestrel$.main(Kestrel.scala:307) at net.lag.kestrel.Kestrel.main(Kestrel.scala)
Mar 28, 2013 6:15:24 PM java.util.logging.LogManager$RootLogger log
FATAL: error: line 1: object twitter is not a member of package com
import com.twitter.conversions.storage._
重现步骤:
- 下载http://robey.github.com/kestrel/download/kestrel-2.4.1.zip
- 将 newrelic.jar 和 newrelic.yml(带配置)放在另一个文件夹中,例如 /tmp/newrelic
编辑 scripts/devel.sh,添加 javaagent 标志
java -server -Xmx1024m -Dstage=development -Dnewrelic.config.file=/tmp/newrelic/newrelic.yml -javaagent:/tmp/newrelic/newrelic.jar -jar "$ROOT_DIR"/kestrel_2.9.2-2.4.1。 jar 4. 运行scripts/devel.sh,你会看到上面的错误。
任何想法?实际上我已经向 NewRelic 开了一张票,但整整一个月都没有得到他们的答复,我希望社区和@lewis-cirne(NewRelic 首席执行官)能够对此有所了解