Last updated 11th May 2021

Get your license key

Sign up at and get your license key.

Add your license key

Add your New Relic license key as an environment level variable:

webpaas variable:create --level environment --environment '<your-environment>' --visible-build false --inheritable false env:NEW_RELIC_LICENSE_KEY --value '<your-new-relic-license-key>'

Give your application a name

Add a new environment level variable to give your application a recognizable name:

webpaas variable:create --level environment --environment '<your-environment>' --visible-build false --inheritable false env:NEW_RELIC_APP_NAME --value '<your-application-name>'

Repeat these two steps for every environment you want to monitor, making sure you give them different application names, matching the ones you entered in the New Relic interface.

Set up the New Relic agent

To set up New Relic in the Java project, we have two ways:

  • Using the Maven project

  • Download the code through

Using Maven

This section explains how to configure Maven to download and unzip the file, which contains all New Relic Java agent components.

Configure your pom.xml to download


Replace JAVA_AGENT_VERSION with the latest Java agent version 1.

Unzip by configuring maven-dependency-plugin in your pom.xml:


The next step is to configure the file to set the agent in the JVM parameters:

name: app
type: 'java:8'
disk: 1024

    build: |
        mvn clean package
        rm -rf newrelic/
        mv target/newrelic/ newrelic/

        start: |
            java -jar \
            -Xmx$(jq .info.limits.memory /run/config.json)m -XX:+ExitOnOutOfMemoryError \

Manual Configuration

To use this installation it is only required that you modify , which will download and set the New Relic Java agent for you.

name: app
type: 'java:8'
disk: 1024


    build: |
      mvn clean package
      rm -rf newrelic
      curl -O $NEW_RELIC_URL

        start: |
            java -jar \
            -Xmx$(jq .info.limits.memory /run/config.json)m \
            -XX:+ExitOnOutOfMemoryError \

You need to wait a little bit for your New Relic dashboard to be generated.

Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.

These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices incl. VAT may vary according to the customer's country of residence
(by default, the prices displayed are inclusive of the UK VAT in force).