score:4
I found the solution is to add the New Relic binaries from the Maven repository, then to point the Procfile to the right place. The detailed solution is for Scala, but should work in Java too:
Download the newrelic.yml file and add it to your git repository in the root of the Play Framework app.
Add the New Relic dependency to Build.scala:
val appDependencies = Seq( "com.newrelic.agent.java" % "newrelic-agent" % "3.7.0", //Other dependencies here ) val main = play.Project(appName, appVersion, appDependencies)
Add the following to the
web:
entry of your Play Framework app's Procfile (all in one line):-J-javaagent:target/universal/stage/lib/com.newrelic.agent.java.newrelic-agent-3.7.0.jar -J-Dnewrelic.config.file=newrelic.yml
Commit all your changes and push to your Heroku app's git repository.
Wait for Heroku to build and deploy the app, then a few minutes for New Relic to start displaying data.
Drool at New Relic's InfoPorn! :-D
I found the path where the New Relic agent was being downloaded from the Maven repository by connecting to my Heroku app's terminal (heroku run bash
in the CLI) and searching around.
Source: stackoverflow.com
Related Query
- How can I install New Relic in Heroku Play Framework without adding the agent to my git repository?
- How i can integrate Apache Spark with the Play Framework to display predictions in real time?
- How can I use the Play Framework in a multi-project?
- How to read and write Anorm object with the new JSON API in Play Framework 2.1-RC2?
- How can I handle decimal numbers using the Scala framework play
- Using Gradle, how can I list just the JSON library of the Play framework as a dependency?
- How can I render the current controller and action name in the view of Play Framework 2?
- How can I set a standard value in a textarea in Play Framework 2.1 using the helper object?
- play framework - how can i call this function for the authenticated user in this code play2 scala zentasks
- How can I create a submit button with parameter in the play framework
- How to convert from_unixtime to to_utc_timestamp in the same dataframe without adding new columns?
- How can I use in java the filtering function of the play framework 2 JsMessages plugin?
- How can I directly test the methods of MyUserService for securesocial plugin for Play Framework
- How do I find the absolute path to a Play Framework app?
- Scala: How can I install a package system wide for working with in the repl?
- How can I use the new Slick 2.0 HList to overcome 22 column limit?
- How to improve the error message readability returned from JsError.toFlatJson or JsError.toJson in Play framework 2.x?
- How do you change the Play 2.1! Framework session cookie name
- Play Framework 2.1: Scala: how to get the whole base url (including protocol)?
- How can I syntax check a Scala script without executing the script and generating any class files?
- How can my Play 2 app respond to different "Accept" headers from the client?
- How to reference to the standard ActorSystem of play framework 2?
- How to show images using Play framework and Scala in the view page
- How can I obtain the DAG of an Apache Spark job without running it?
- How can you get ScalaFX to play nice in the SBT console?
- Play: How to remove the fields without value from JSON and create a new JSON with them
- How can I add scala actors to an existing program without interfering with the normal termination behavior?
- How can I use the new reflection API to tell if the component type of an array conforms to a type parameter?
- How to list out all the files in the public/images directory in a Play Framework 2 Scala application?
- How to use the Play Framework with Google App Engine with locally installed Java 7?
More Query from same tag
- Akka - Common service actor: Identify or Extension
- How to init case class from one JSON string instead of separate fields of form
- Class not found on sbt build
- Scala API for generating Swagger files?
- Scala - Map[Class[T], Seq[T]] - generics in key and values
- Count instances of combination of columns in spark dataframe using scala
- Scala files don't get compiled to .class files in out folder
- How do akka nodes discover other nodes?
- Spark: OutOfMemory despite MEMORY_AND_DISK_SER
- Scalatest takes 30s to start tests
- immutable data structure in Scala
- Unexpected behaviour for loop with "until"
- Functional Programming in Scala book: How to run the inline examples from chapter 9?
- How to set Spark MemoryStore size when running in IntelliJ Scala Console?
- Push a scala project to Heroku using Git - Error for sbt.version
- A confusion about import in Spark
- Can I change the error message given by the compiler in scala?
- AKKA FSM : Messages are not delivered to FSM actor references properly
- Set the parallelism level for all collections in Scala 2.10?
- MapReduce context output in Scala
- How to specify bound for a generic type with generic type in Scala?
- How to re-order operators in a String?
- suchThat usages in ScalaCheck
- Passing SQLContext between classes
- String getting incorrectly parsed to datetime format in Scala
- "502 Bad Gateway" with CloudBees Play2 Deployment (Java and Scala)
- Scala. Strange result with floating point numbers
- how to map the failed projection of a Future
- Using RxJava in Scala with flatmap
- Scala generic type method matching