Reputation:
I have deployed a Scala, play framework, application on Heroku. And I have added the new relic add-on to my app.
I have followed the Java guide as Scala runs on the Java VM.
$ heroku addons:add newrelic:standard
-----> Adding newrelic:standard to ... done, v7 (free)
Unziped newrelic to newrelic in the application
$ git add newrelic
$ git commit -m 'add newrelic'
$ heroku config:add JAVA_OPTS='-Xmx384m -Xss512k -XX:+UseCompressedOops -javaagent:newrelic/newrelic.jar'
$ git push heroku master
Now to the problems. First when I accessed the add on I had to create a new account on new relic with new password and it wanted my credentials? Is this correct? Shouldn't my Heroku account suffice, I later think it started to work.? Strange process so now I believe I have two accounts. In Herokus page my account is standard hourly and in new relics it's standard lite.
I don't understand how to see my performance stats. I actually think that the new relic isn't set up correctly?
One absurd thing is the new relics homepage which says not sufficient permissions on everything except "tell a friend and earn bucks" not even support works WTF.
I have attached two screenshot with my credentials masked. can anyone comment if they look like they should or if the new relic has set up itself incorrectly?
Upvotes: 5
Views: 5844
Reputation: 5148
When I attempted to use New Relic on Heroku I was prompted to enter credit card information
$ heroku addons:add newrelic:standard
but I just exited out and the logging for my Rails application is working*. Note that depending on your New Relic settings you may just be logging locally (default for development mode does not log to the cloud but is accessible locally).
Sorry to pollute this thread with Ruby stuff, but you may find something similar with regards to Heroku and New Relic.
*update: I had the same issue again when deploying another application and realized that to use the Heroku New Relic add-on you have to provide credit card information, but if you just directly instrument your application you do not have to give credit card information. YOu do have to have created an account already, though.
Upvotes: 0
Reputation: 146
Check whether you find anything in the heroku logs with heroku logs
. Also, you can increase the log level of new relic by setting the system properties newrelic.config.log_level
and newrelic.debug
. Also note that after creation of a new account or after password changes it takes a while until the changed credentials are propagated.
To set a finer log log level:
$ heroku config:set JAVA_OPTS=”-Xmx384m -Xss512k -XX:+UseCompressedOops -Dfile.encoding=UTF-8 -javaagent:target/staged/newrelic-agent-2.20.0.jar -Dnewrelic.bootstrap_classpath=true -Dnewrelic.config.file=./conf/newrelic.yml newrelic.config.log_level=finer newrelic.debug=true”
Make sure to not run with that in production. It produces quite a lot of logs.
See our blog post about how to setup New Relic with Play 2.1/Scala on Heroku: http://techblog.nezasa.com/2013/08/performance-monitoring-of-nezasa-with.html
Upvotes: 3
Reputation: 1107
This could be happening because your hosted application does not have the right credentials (e.g license key) provided by newrelic.
Did you update the default newrelic.yml file obtained from the 'newrelic.jar' extract? You can obtain your app's license key in the account settings menu when accessing newrelic through the heroku interface (your 1st screenshot). Then set the following config vars on heroku;
NEW_RELIC_LICENSE_KEY="your license key"
NEW_RELIC_APP_NAME="your app name"
Don't forget to set the appropriate RACK_ENV config var too e.g RACK_ENV=production
Then update your newrelic.yml file by finding and changing the following lines;
license_key: '<%= license_key %>'
to license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
app_name: My Application
to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] %>'
app_name: My Application (Development)
to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] (Development) %>'
app_name: My Application (Staging)
to app_name: '<%= ENV["NEW_RELIC_APP_NAME"] (Staging) %>'
Here is a sample newrelic.yml file with environment vars set.
You should be able to access new relic from heroku interface after you've pushed your changes.
Upvotes: 3
Reputation: 3526
You should be able to use New Relic through the heroku interface without creating a separate account.
Once you're app is deployed with the agent, and has gotten a few requests you should start seeing data in the interface.
The agent does create a log (I believe you can get output via heroku logs
) so that might also help you troubleshoot it.
I'd suggest opening a support ticket on http://support.newrelic.com.
Upvotes: 3