将Scala应用程序与NewRelic Java Agent集成
作者:互联网
我想使用java agant将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(with config)在另一个文件夹中,例如的/ 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首席执行官)可以屏蔽这个
解决方法:
New Relic Java Agent中没有Scala支持
https://newrelic.com/docs/java/new-relic-for-java
标签:newrelic,java,scala,finagle,kestrel 来源: https://codeday.me/bug/20190901/1779750.html