Deployment success rate
Deployment success rate tracks how often deployments complete without failure. A declining success rate is often an early indicator of pipeline instability, test coverage gaps, or environmental drift that can increase overall change risk.
Configuring the tile
Configure the following in the tile editor:
- Data Source: Select Azure DevOps.
- Data Stream: Select Deployments.
- Objects: Select the projects you want data from.
Timeframe: Select the timeframe you want to track. Note that after adding a monitor or configuring a KPI the Use dashboard timeframe option is disabled.
- SQL Analytics: Enable the toggle.
- Query: Enter the following query to return the count of total deployments, successful deployments, and the deployment success rate.
SELECT COUNT(*) AS total_deployments, SUM(CASE WHEN LOWER("deploymentStatus") = 'success' THEN 1 ELSE 0 END) AS successful_deployments, ROUND( SUM(CASE WHEN LOWER("deploymentStatus") = 'success' THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0), 1 ) AS deployment_success_rate FROM dataset1 WHERE "CompletedOn" IS NOT NULL; - Columns: Click Edit next to the the Deployment Success Rate column and configure the following:
- Type: Select Percent.
- Decimal Places: Enter 0.
- Click Save.
- Query: Enter the following query to return the count of total deployments, successful deployments, and the deployment success rate.
- Visualization: Select Gauge.
- Mapping > Value: Select Deployment Success Rate.
- Range > Min: Select Fixed and enter 0.
- Range > Max: Select Fixed and enter 100.
- Click Save.
Adding a monitor
With a healthy baseline deployment success rate of around 95%, we trigger a warning when success drops by roughly 5-10%, and an error when it falls below an acceptable operational threshold. This keeps the monitor sensitive to meaningful degradation without reacting to the occasional isolated failure.
Configure the following in the tile editor:
- Monitoring: Enable the Monitoring toggle.
- Type: Select Threshold.
- Value: Select top.
- Column: Select Deployment Success Rate.
- Conditions:
- Error: Enable the toggle, then configure as Less than, and supply an appropriate value. For our example, we’ll enter: 85.
- Warning: Enable the toggle, then configure as Less than, and supply an appropriate value. For our example, we’ll enter: 90.
- Click Save.
Publishing a KPI
To give even more value to this dashboard (that's right, it gets even better!), we can promote key operational metrics to first-class KPIs.
Once published, this KPI can be selected as a data stream when configuring a tile, making it both easier to track on-call performance over time and to reuse this data across your other dashboards.
Add a KPI type
- Click Add KPI type. The Add KPI type window opens.
- Name: Enter Deployment success rate.
- Click Save.
Configure the tile KPI
Configure the following in the tile editor.
- KPI: Enable the toggle.
- Type: Select Deployment success rate.
- Click Save.