New Relic APM

This is documentation for the Pivotal Cloud Foundry New Relic APM tile.

New Relic APM supports real-time instrumentation and monitoring of application performance via its embedded agent that runs with applications. New Relic agent code embedded or bundled with the application instruments the application code and publishes performance monitoring metrics and other details back to New Relic APM Dashboard.

New Relic Service Broker

A Service Broker allows Cloud Foundry applications to bind to services and consume the services easily from the Pivotal Apps Manager Console or from the command line. The New Relic Service Broker enables you to use one or more New Relic accounts and is deployed as a Java Application on Cloud Foundry. The Broker exposes the New Relic service on the Cloud Foundry Marketplace and allows users to directly create a service instance and bind it to their applications either from the Pivotal Apps Manager Console or from the command line.

The Pivotal Cloud Foundry (PCF) Tile for New Relic installs the New Relic Service Broker as an application, registers it as a Service Broker on Cloud Foundry, and exposes its service plans on the Marketplace. This makes the installation and subsequent use of New Relic on your Cloud Foundry applications simple and easy.

Trial License

Customers interested in using New Relic can obtain a 60 day free trial license.

Product Snapshot

Current New Relic APM Tile for Pivotal Cloud Foundry Details
Version: 1.1.0
Release Date: 2016-10-03
Software component version: New Relic Service Broker 1.1.0
Compatible Ops Manager Version(s): 1.7.x, 1.8.x
Compatible Elastic Runtime Version(s): 1.7.x, 1.8.x
vSphere support? Yes
AWS support? Yes

Upgrading to the Latest Version

Upgrade path Upgradable from Ops Mgr 1.6 to 1.7, and from Ops Mgr 1.7 to 1.8

Install via Pivotal Ops Manager

  1. Download the product file from Pivotal Network.
  2. Import the product file to your Ops Manager installation.
  3. Click Add next to the uploaded product description in the Ops Manager “Available Products” view to add this product to your staging area.
  4. Click the newly added tile to review any configurable options.
  5. Click Apply Changes to install the service.

Configuring the New Relic Tile

  1. Log in into Pivotal Ops Manager.
  2. Click Import a Product and import the New Relic Tile.

    Import product

  3. Click Add on the New Relic Tile.


  4. Select the New Relic tile.


  5. Configure the New Relic Service Broker.

    • Click Add on the far right of the Service Plan screen to create a new service plan.


  6. Create a service plan with your New Relic license key.

    • Log in to your New Relic account and navigate to the Account Settings page from the drop-down menu in the upper right corner of the page. Save the plan(s).

    Account info


  7. Apply your changes.

  8. On completion of New Relic Tile install, check the Services Marketplace in Apps Manager.


  9. View New Relic Service Plans.


  10. Bind the New Relic Service to an Application.


  11. In a terminal window, use the cf restage command to make the changes effective.

      $ cf restage APPNAME
  12. Log in into New Relic to view monitoring data.

    Figure 13.1: New Relic App Monitoring Dashboard

    Figure 13.2: New Relic Transactions View

    Figure 13.3: Transaction Traces View

    Figure 13.4: New Relic Database View

    Figure 13.5: New Relic Web Transactions View

    Figure 13.6: New Relic Top Web Transactions View

    Figure 13.7: New Relic JVMs View

Configuration with HTTP Proxy

If the Cloud Foundry environment needs to use an http(s) proxy for external outbound communication, the Service Broker itself does not need to know anything about the http proxy, as it just relays the license keys to the consumer apps. The consumer application should specify the http_proxy or https_proxy as an environment variable for the agent to communicate externally with non-java applications, and use JAVA_OPTS for Java applications. In addition, the New Relic Agent should also be configured with its own set of parameters (-Dnewrelic.config.*) to communicate with its controller through the proxy for Java language applications..

Specify using http_proxy for the New Relic non-Java application agent to talk to its controller via the proxy

  $ cf set-env APPNAME http_proxy ‘'

  $ cf set-env APPNAME https_proxy ‘'

Specify using JAVA_OPTS for the New Relic Java agent to talk to its controller via the proxy

  $ cf set-env APPNAME JAVA_OPTS " -Dtest.value=barbar
  -Dnewrelic.config.proxy_port=8080 “

If a Java application also needs to talk through a proxy, add the Java proxy settings in addition to the New Relic agent proxy settings

  $ cf set-env APPNAME JAVA_OPTS " -Dtest.value=barbar
  -Dnewrelic.config.proxy_port=8080 -Dhttps.proxyPort=8080  “

For a non-java app that needs to talk outbound via a proxy

  $ cf set-env APPNAME http_proxy http://user@password:myproxy....:8080/
  $ cf set-env APPNAME https_proxy https://user@password:myproxy....:8080/

Whenever making changes to Cloud Foundry environment variables, you must restage your application(s) to make the changes effective.

  $ cf restage APPNAME

These environment variables can either be set individually per app, or via env variable groups to be set for all apps as part of staging, running environments, etc., using the cf CLI.


  • running-environment-variable-group, revg: Retrieve the contents of the running environment variable group
  • staging-environment-variable-group, sevg: Retrieve the contents of the staging environment variable group
  • set-staging-environment-variable-group, ssevg: Pass parameters as JSON to create a staging environment variable group
  • set-running-environment-variable-group, srevg: Pass parameters as JSON to create a running environment variable group

Use the JAVA_OPTS environment variable to specify New Relic Agent-specific environment variables in the Staging environment group so the Java Buildpack can use that and push it in the correct place. Specifying JAVA_OPTS in the Runtime environment variable group will not yield anything, as the buildpack will not know about it.


  $ cf ssevg '{ "JAVA_OPTS" : " -Dtest.value=barbar
  -Dnewrelic.config.log_level=finer ", "test_env_profile" : "Staging" }'

Also refer to the following documentation:

Packaging Dependencies for Offline Buildpacks

If you are running PCF in an offline manner, you should recreate and package the dependencies, including the New Relic agent binaries, via offline buildpacks in your PCF environment.

More details on this can be found here:


  • Currently supported Buildpacks bundling New Relic Agent are the Java, node.js and PHP Buildpacks.
    • Java Buildpack 2.7 and later and 3.x
    • Node.js Buildpack 1.5.19 and later
    • PHP Buildpack 4.0+
  • Similar support would be built for other language buildpacks in future releases.


Please provide any bugs, feature requests, or questions to the Pivotal Cloud Foundry Feedback list.

Was this helpful?
What can we do to improve?
Create a pull request or raise an issue on the source for this page in GitHub