{"id":14390,"date":"2020-06-05T07:56:22","date_gmt":"2020-06-05T07:56:22","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=14390"},"modified":"2021-11-05T10:41:55","modified_gmt":"2021-11-05T10:41:55","slug":"how-to-enable-deployment-history-in-newrelic","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-enable-deployment-history-in-newrelic\/","title":{"rendered":"How to enable Deployment history in Newrelic?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">The deployments resource allows for querying, creating and deleting deployment records for an application.<\/h3>\n\n\n\n<p><strong>Deployment history<\/strong><\/p>\n\n\n\n<p>NewRelic Deployments feature reveals the impact of deployments on your application&#8217;s performance. You&#8217;ll quickly see whether the deployment had a positive or negative impact on CPU, memory, response time, throughput, database activity, or errors.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"352\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeploymenthistory-1024x352.jpg\" alt=\"\" class=\"wp-image-14392\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeploymenthistory-1024x352.jpg 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeploymenthistory-300x103.jpg 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeploymenthistory-768x264.jpg 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeploymenthistory.jpg 1133w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>New Relic Pro customers can come here to see details of their application deployment history, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Date &amp; time<\/li><li>Revision number<\/li><li>Aggregate metrics for the deployed code:<\/li><li>Apdex score<\/li><li>CPU usage<\/li><li>Memory usage<\/li><li>Response time<\/li><li>Throughput<\/li><li>Error rate<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How to track enable deployments with New Relic?<\/h3>\n\n\n\n<p><strong>Send deployment information from the Java agent jar file?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"594\" height=\"385\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeployment-api-history.jpg\" alt=\"\" class=\"wp-image-14393\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeployment-api-history.jpg 594w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/newrelic-enableDeployment-api-history-300x194.jpg 300w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/figure>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$ java -jar newrelic.jar deployment DEPLOYMENT_OPTIONS\n$ <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"get SHA-1 34837888734\"<\/span> | java -jar newrelic.jar deployment DEPLOYMENT_OPTIONS --changes\n$ java -jar newrelic.jar deployment user=$deployed_by revision=$deployment_versioncat\n$ change.log | java -jar newrelic.jar deployment --changes --revision=<span class=\"hljs-string\">\"Summer Sale Event\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>Send deployment information directly via HTTPS<\/strong><\/p>\n\n\n\n<p>This API endpoint creates a deployment record for a given application. Deployment records are created with the following attributes:<\/p>\n\n\n\n<p>Required:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Application ID<\/li><li>Revision, such as a git SHA<\/li><\/ul>\n\n\n\n<p>Optional:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Changelog<\/li><li>Description<\/li><li>User posting the deployment<\/li><li>Timestamp of the deployment<\/li><\/ul>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/b1bfe829266240420e346aac12427782.js\"><\/script>\n\n\n\n<p><strong>Reference<\/strong><br>https:\/\/rpm.newrelic.com\/api\/explore\/application_deployments\/create<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_83350\"><iframe loading=\"lazy\"  id=\"_ytid_94714\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_83350\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>The deployments resource allows for querying, creating and deleting deployment records for an application. Deployment history NewRelic Deployments feature reveals the impact of deployments on your application&#8217;s performance. You&#8217;ll quickly&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14390","post","type-post","status-publish","format-standard","hentry","category-sql"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=14390"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14390\/revisions"}],"predecessor-version":[{"id":24790,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14390\/revisions\/24790"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=14390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=14390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=14390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}