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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With