How it works
CI deploy MTTR (Mean Time To Recovery) measures how quickly your team recovers from failed production deployments. This is one of the four key DORA metrics for measuring software delivery performance. Lower MTTR indicates:- Fast incident response
- Effective rollback procedures
- Strong monitoring and alerting
- Experienced on-call teams
Calculation
MTTR is calculated as the average time from the first failed run of a production deployment pipeline to the next successful run of the same pipeline in the same project or repository. Formula:How recovery is measured
- A run of a production deployment pipeline fails
- The timer starts when that run completes. If more runs of the same pipeline fail before one succeeds, the timer still starts at the first failure
- The timer stops when the next run of the same pipeline in the same project succeeds
- This duration is recorded as one recovery time
- MTTR is the average of all recovery times in the period
Which runs count
MTTR only uses runs that Weave counts as production deployments, so it follows your production deployment settings. See Deployment detection. Weave pairs failures and successes by pipeline and project, not by branch or environment, and it doesn’t read health checks or incident status. If a pipeline that runs on every branch or merge request is marked as production, a failed feature-branch run and a later successful run on another branch are paired, and MTTR measures CI pipeline recovery rather than production recovery. To keep MTTR to production:- Mark only the pipelines that deploy to production as production
- For GitLab projects that release with tags, set a production tag regex so only matching tag pipelines count
- For GitLab, turn on default branch deployments instead of marking a pipeline that also runs on other branches
Industry benchmarks
Based on DORA research:Why it matters
Fast recovery time is critical for:- Service reliability: Minimize customer impact from deployment issues
- Business continuity: Reduce revenue loss from downtime
- Team stress: Lower pressure on on-call engineers
- Customer trust: Demonstrate reliability and responsiveness
- Manual deployment processes
- Inadequate monitoring and alerting
- Complex rollback procedures
- Unclear incident response playbooks
Recovery strategies
Teams typically use two approaches:1. Rollback (fastest)
Revert to the last known good deployment:- Pros: Fast recovery, well-tested code
- Cons: May require re-deploying the fix later
- Best for: Critical production issues
2. Forward fix (most complete)
Deploy a fix for the issue:- Pros: Resolves the root cause immediately
- Cons: Takes longer, may introduce new issues
- Best for: Non-critical issues with known fixes
Elite teams can do forward fixes in under an hour because they have:
- Small, focused deployments
- Comprehensive automated testing
- Fast CI/CD pipelines
- Strong monitoring to quickly identify root causes
Improving MTTR
To reduce mean time to recovery:-
Automate rollbacks:
- Implement one-click rollback procedures
- Use blue-green or canary deployments
- Maintain deployment version history
-
Improve monitoring:
- Set up real-time deployment health monitoring
- Configure alerts for deployment failures
- Track key performance indicators (KPIs) during deployments
-
Streamline incident response:
- Create clear runbooks for common issues
- Define on-call rotation and escalation paths
- Practice incident response through game days
-
Reduce deployment complexity:
- Deploy smaller, more frequent changes
- Minimize deployment dependencies
- Use feature flags to decouple deployment from release
-
Learn from incidents:
- Conduct blameless postmortems
- Track trends in deployment failures
- Update processes based on lessons learned
Technical details
How is recovery time calculated?
How is recovery time calculated?
Recovery time is measured from the completion timestamp of a failed deployment to the completion timestamp of the next successful deployment:Only runs of the same production pipeline in the same project are paired.
What deployments are included?
What deployments are included?
Included:
- Failed and successful runs of pipelines counted as production deployments
- Both rollbacks and forward fixes
- Pipelines not counted as production deployments
- Cancelled runs
How is MTTR aggregated over time?
How is MTTR aggregated over time?
MTTR is calculated as the mean (average) of all recovery times within your selected time period:
- Daily view: Average recovery time for failures on that day
- Weekly view: Average recovery time for all failures in the week
- Monthly view: Average recovery time for all failures in the month
What data sources are used?
What data sources are used?
CI deploy MTTR uses data from:
- GitHub Actions: Workflow run timestamps and conclusions
- GitLab CI/CD: Pipeline completion times and statuses
- Azure DevOps: Build and classic release deployment completion times and results
- CircleCI: Workflow completion times and statuses
- Argo CD: Application sync completion times and results
- Jenkins: Build start/end times and results
Public API
Available fromGET /metrics as ci_deploy_mttr: average recovery time in seconds from the first failed production deploy in a streak to the next successful deploy of the same workflow and project. Requires a CI/CD connection and production-classified workflows. group_by is not supported; teams and accounts filters still apply.
Related metrics
- CI deploy frequency: How often you deploy
- CI deploy success rate: Percentage of successful deployments
- PR deploy lead time: Time from code merge to production
