title: Integrating Scala app with NewRelic Java Agent
body: <p>I want to integrate a Scala app (<strong>Kestrel</strong>, <a href="http://robey.github.com/kestrel" rel="nofollow noreferrer">http://robey.github.com/kestrel</a>) with NewRelic using java agant but failed with error</p>
  
  <pre><code>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._
  </code></pre>
  
  <p><strong>Steps to reproduce:</strong> </p>
  
  <ul>
  <li>Download <a href="http://robey.github.com/kestrel/download/kestrel-2.4.1.zip" rel="nofollow noreferrer">http://robey.github.com/kestrel/download/kestrel-2.4.1.zip</a> </li>
  <li>Put newrelic.jar &amp; newrelic.yml (with config) inside another folder, e.g. /tmp/newrelic </li>
  <li><p>Edit the scripts/devel.sh, Add the javaagent flags</p>
  
  <p>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. Run scripts/devel.sh and you will see the above error.</p></li>
  </ul>
  
  <p>Any idea? Actually I have fire a ticket to NewRelic but got no answer from them for a whole month, I hope the community and <a href="https://stackoverflow.com/users/595398/lewis-cirne">@lewis-cirne</a> (NewRelic CEO) can shield some light on this</p>