How to track deployment to Azure webapp in NewRelic?
Asked Answered
I

1

8

Background info: I have set up Azure to automatically deploy code from develop branch (on Github) to dev-webapp when code is pushed to develop branch. When code is pushed to master branch, Azure deploys code from master branch to test-webapp and pre prod-deployment slot.

In Azure I'm using New Relic Appservice to monitor these apps. It works. What I want now is to notify New Relic when code is deployed to a webapp.

Quote New Relic:

To notify New Relic of a deployment, you can POST to https://api.newrelic.com/deployments.xml and add the API key as a header

To notify New Relic when code is deployed to dev and test, I could set up webhook in GitHub to run when code is pushed to develop-branch and master-branch. I have tested this, and it works. I feel like it is not optimal since the notification comes from Github, and not from Azure which is where the deployment actually takes place.

I also want to notify New Relic when the pre-prod deploymentslot is swapped with prod.

Is it possible? And what could be the best way to do this?

Maybe webjobs could be the soulution? This should be a webjob that only runs once after webapp is deployed and deployment-slot is swapped (for prod). I cannot find any information about setting up such job.

Ieyasu answered 2/10, 2015 at 20:42 Comment(1)
Just curious, how did you get the New Relic headers into the web hook in GitHub?Renn
W
1

use powershell to swap slots and call new relic uri https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/

I'm sorry I don't know New Relic but perhaps there is some similar solution as in application insights (why don't switch?), where you can specify version to be send: http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/07/application-insights-support-for-multiple-environments-stamps-and-app-versions.aspx (part: Version to Version comparisons)

We answered 17/10, 2015 at 21:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.