New Relic allows you to send information about application deployments via the command line. Then, you can view deployment information on the Deployments page in the UI: From the New Relic menu bar, select APM > Applications > (selected app) > Events > Deployments.
Access to this feature depends on your subscription level.
As part of the installation process, change the default
app_name in your newrelic.yml file to a meaningful name. This will assign instances in the given environment the label given by
app_name when browsing your data in the New Relic UI.
To include the app name and host information in your newrelic.yml file:
- Download the latest version of the New Relic Java agent.
- Change the default
app_namein your newrelic.yml file to a meaningful name.
Add this entry to newrelic.yml in the common section:
The deployment upload script will use this name to associate all of the instances for the app with the deployment. For example, if you set the deployment marker and push 100 instances of the app, the Deployments page will show one deployment for the 100 instances.
To send deployment information to New Relic from the Java agent jar: From the command line, execute the following command, using any of the available options:
java -jar newrelic.jar deployment [options]
Optional values you can include with the deployment command include the following, where
description is short text. Also, if you use
--changes, you can pipe the change log into the command.
deployment [OPTIONS] [description]: --appname=name Set the application name Default is app_name setting in newrelic.yml --environment=name Override the JAVA_ENV environment variable and newrelic.environment system property --user=USER Specify the user deploying --revision=REV Specify the revision being deployed --changes Read in a change log from the standard input
Other deployment options
You can also record deployments with the New Relic REST API v2.