We recommend that you use the change tracking feature instead of the older deployment markers. If you've been using deployment markers feature, you can still use it, but keep in mind that the change tracking feature is available for and , as well as .
Deploying an app can be a risky event—when your app breaks, and a bad deployment is often the cause. New Relic allows you to track deployments so you can correlate deployments with changes in your app's performance. Tracking deployments creates deployment markers that appear in APM charts and dashboards.
See how deployment markers work in this short video (4:30 minutes):
Options for tracking deployments
You can use the New Relic REST API v2 to record new deployments and retrieve a list of past deployments. In addition, some APM agents have agent-specific methods to record deployments automatically.
You can use your Slack integration with New Relic, or a simple webhook, to notify your team in real time of deployments for applications monitored by APM. Slack provides a webhook URL that allows you to post generic JSON that will appear formatted in a chosen Slack channel.
There are a few places where you can view deployments in the New Relic UI after they have been recorded:
Deployment markers are not available for browser applications, but you can try these alternatives:
Switch from deployment markers to the change tracking feature that enables you to track browser application changes.
See browser releases for a way to tag errors with release versions.
Record deployments with the REST API
You can use the New Relic REST API v2 to record deployments and get a list of past deployments.
The examples in this document use curl as a command line tool. However, you can use any method to make your REST requests. You can also create and view deployments with the API Explorer.
JSON uses double quotes " for element names and content. Using single quotes ' will cause errors.
The examples use X-Api-Key which can be used for either a user key or a REST API key. User keys are now the preferred way of accessing our REST APIs, and you may use Api-Key headers when using them.
To record a new deployment, send a POST request that includes your API key to the deployments endpoint. Attach the payload in JSON format (see Character limits and JSON parameters). All payload parameters are optional except revision.
For example:
bash
$
curl-X POST "https://api.newrelic.com/v2/applications/$APP_ID/deployments.json"\
"description": "Added a deployments resource to the v2 API",
$
"user": "datanerd@example.com",
$
"timestamp": "2019-10-08T00:15:36Z"
$
}
$
}'
To record a deployment with PowerShell, send a POST request that includes your API key to the deployments endpoint. Attach the payload in JSON format (see Character limits and JSON parameters). All payload parameters are optional except revision.
This example uses PowerShell version 3 or higher:
Invoke-WebRequest-Uri https://api.newrelic.com/v2/applications/YOUR_APP_ID/deployments.json -Method POST -Headers @{'X-Api-Key'='$API_KEY'}-ContentType 'application/json'-Body '{
To retrieve a list of all past deployments for your app, send a GET request that includes your API key to the deployments endpoint. GET requests do not use a JSON payload.
For example:
bash
$
curl-X GET "https://api.newrelic.com/v2/applications/$APP_ID/deployments.json"\
>
-H"X-Api-Key:$API_KEY"\
>
-i
This example requests a list of deployments for app ID 9999999:
bash
$
curl-X GET "https://api.newrelic.com/v2/applications/9999999/deployments.json"\
The JSON payload can include the following parameters.
Important
UTF-8 4 byte characters, such as Emojis and some non-Latin language glyphs, cannot be used in the deployment text.
Parameter
Data type
Description
revision
String, 127 character maximum
Required. A unique ID for this deployment, visible in the Summary page and on the Deployments page. Can be any string, but is usually a version number or a Git checksum.
changelog
String, 65535 character maximum
Optional. A summary of what changed in this deployment, visible in the Deployments page when you select (selected deployment) > Change log.
description
String, 65535 character maximum
Optional. A high-level description of this deployment, visible in the Summary page and on the Deployments page when you select an individual deployment.
user
String, 31 character maximum
Optional. A username to associate with the deployment, visible in the Summary page and on the Deployments page.
timestamp
ISO 8601
Optional. When the deployment occurred, down to the second. If not specified, the deployment will be recorded at the time when the API call was received. Timestamp requirements:
Must be in UTC time.
Must be after the most recent deployment timestamp.
Cannot be in the future.
Must be in ISO8601 format; for example, "2019-10-08T00:15:36Z".
Record deployments using the New Relic agent
Some agents have additional methods to record deployments:
Whether you're tracking deployments with the REST API or the newer GraphQL API, you can notify your team members using a webhook. For details, see the change tracking webhook instructions.