Ruslan
Ruslan

Reputation: 14630

Heroku + Java + WAR deployment + New Relic

Heroku don't allow to upload files, just git repository(we can't share sources) and WAR files. We using WAR.

So, how i can use(my own newrelic.yml and newrelic-agent.jar) new relic with war deployments on heroku?

update.

Ok, i add newrelic add-on to application, and now can set some environment variables:

heroku config:set NEW_RELIC_APP_NAME="name"
heroku config:set NEW_RELIC_LICENSE_KEY="key"

But it's very basic and not working :). How to pass own config file to add-on?

update.

Find similar question: Heroku : Using NewRelic with heroku deploy:war approach

Upvotes: 1

Views: 223

Answers (2)

earldouglas
earldouglas

Reputation: 13473

You can upload a .war file to Heroku using either the Heroku toolbelt:

heroku plugins:install https://github.com/heroku/heroku-deploy
heroku deploy:war --war <path_to_war_file> --app <app_name>

Or directly using curl:

curl -X POST -F [email protected] -i https://:<API_KEY>@direct-to.herokuapp.com/direct/mywebapp/war

Upvotes: 1

llawson
llawson

Reputation: 351

The simplest way to get application monitoring working with New Relic is by using the add-on as described here: https://addons.heroku.com/newrelic

Something like this should work:

heroku addons:add newrelic:stark

Heroku has some documentation about how to monitor Java applications using New Relic here: https://devcenter.heroku.com/articles/newrelic#java-configuration

There are also some other similar Stack Overflow questions about Heroku, New Relic and Java. For example:

adding newrelic addon heroku java

Upvotes: 1

Related Questions