As a developer, you often want to deploy different application versions to different environments, for example to differentiate between your production and staging application instances. By deploying a new version of your app into a staging environment, you can easily test it before it goes live. With Azure Deployment Slots, a feature of the Azure App Service, you can create one or more slots that can host different versions of your app. You can then easily swap these deployment slots without causing any downtime for your users.
Unlike other monitoring tools on the market, which don’t provide AI-driven anomaly detection and alerting, Dynatrace delivers real-time data to track the performance of your deployed apps and the characteristics of your client traffic. Dynatrace then alerts you to any detected performance issues. You can now simplify cloud operations with automated observability into the performance of your Azure cloud platform services in context with the performance of your applications.
- Get full visibility into your Azure Deployment Slots with one click
- Monitor and compare performance after slot swaps
- Receive alerts for any custom metric events in your Azure Deployment Slots
What are Azure Deployment Slots?
Azure Deployment Slots are available for Azure App Service and can be backed either by an App Service Web App or App Service Function App. When you deploy an app to App Service, by default it’s deployed to the production slot. If you’re running Standard, Premium, or Isolated App Service plan, you can define other slots.
A popular blue-green deployment scenario includes a staging slot in which new changes to the app are deployed and validated. You can even redirect part of your production traffic to the staging slot in order to test the new version on a limited number of real users. Once the staging version is tested and validated, it can be swapped with the production version. For full details, see the Azure documentation.
Get full visibility into your Azure Deployment Slots with one click
Once you decide to use Deployment Slots in your deployment pipeline, you need to know what the performance of the new version of the app is and whether any real user traffic has led to unexpected errors. The Dynatrace Software Intelligence Platform provides a simple one-click setup and integration for ingestion of metrics from Azure Monitor, which simplifies data consolidation.
With our new Azure Deployment Slot dashboard you get a holistic overview across all deployment slots so you can easily see at a glance how much CPU and memory your app is using in a given deployment slot. You can also track how many requests each slot serves and quickly see if there are any client- or server-side HTTP errors. Successful responses are not the only thing that matters to your clients, therefore you can also monitor response times and correlate them with the size of incoming and outgoing data. Moreover, all these metrics are also provided for each physical instance in the cluster that backs the deployment slot.
This enables cloud operations to gain actionable insights into the performance of the applications deployed in Azure Deployment Slots.
Monitor and compare performance after slot swap
The biggest advantage of using deployment slots is that you can quickly swap two slots. This comes in handy when, for example, you swap between a sprint slot (which hosts the latest version of your app) and a staging slot (which hosts the version of your app that you plan to deploy to production).
Let’s say that you redirect 5% of user traffic to a staging slot in order to ensure that it works properly with real data. Dynatrace allows you to quickly check if the new code in the staging slot works as expected.
In the screenshot below you can see that there were many more server errors (5xx) when the slots were swapped at around 14:05. Thanks to Dynatrace, you can see all this clearly aggregated on a chart and then respond accordingly. As these errors affect real users, you have two options for solving this situation:
- Redirect the 5% of traffic back to your production slot, or
- Swap the deployment slots once again to restore the previous, stable app version that was moved to the sprint slot
Receive alerts for any metric event in your Azure Deployment Slots
Dynatrace alerts you when there are too many client- or server-errors or if the response times of your app deployed in a deployment slot increase. This can be done by creating a custom event for alerting (Go to Settings > Anomaly detection > Custom events for alerting).
How to get started
Once you’ve set up the Azure Monitor integration with the Dynatrace Software Intelligence Platform, go to Settings > Cloud and virtualization > Edit Azure Subscription > Add service and search for “Azure Web App Deployment Slot.”
Add the service and you’re all set. The integration will start monitoring all non-production deployment slots in your Azure App Service.
To learn more about Azure App Service Deployment Slots monitoring, please visit our help page.
As always, we welcome your feedback and comments. Please share your thoughts with us either via Dynatrace Community, directly within the product through Dynatrace ONE chat, or your Dynatrace Account Manager. For additional resources for Azure monitoring, see our on-demand Power Demo, Advancing cloud Performance: Applying AI and automation to Microsoft Azure.