- Clone this repo.
- Edit the
newrelic.yml
file. - Change the app name under the
app_name
section if you wish. - Go to the
license_key
and put your STAGING ingest API key there. - You already have a jar compiled for you (if you want to compile it yourself, execute
./gradlew build
and get the jar from thebuild/libs
directory), so you can start the service with: - Check the
application_logging
section, there is all the configuration for sending logs, don't change anything, just admire.
> java -jar -javaagent:newrelic.jar test_app.jar
- Your service should be running, you can open a browser at `localhost:8080'
- There are four different endpoints, all of them generate log lines:
- The root
/
/hello
, you can pass the argument?name=yourname
err
, generates an error log linenpe
throws a null pointer exception, this is the one you want to use if you want to check the errors inbox
- The root
- You can now set up Errros inbox in New Relic Staging. Check the docs