DevOps Research and Assessment (DORA) metrics

Version history

The DevOps Research and Assessment (DORA) team has identified four metrics that measure DevOps performance. Using these metrics helps improve DevOps efficiency and communicate performance to business stakeholders, which can accelerate business results.

DORA includes four key metrics, divided into two core areas of DevOps:

For software leaders, tracking velocity alongside quality metrics ensures they’re not sacrificing quality for speed.

For a video explanation, see DORA metrics: User analytics and GitLab speed run: DORA metrics.

DORA metrics in Value Stream Analytics

The four DORA metrics are available out-of-the-box in the Value Streams Dashboard. This helps you visualize the engineering work in the context of end-to-end value delivery.

The One DevOps Platform Value Stream Management provides end-to-end visibility to the entire software delivery lifecycle. This enables teams and managers to understand all aspects of productivity, quality, and delivery, without the “toolchain tax”.

Deployment frequency

Introduced fix for the frequency calculation formula for all and monthly intervals in GitLab 16.0.

Deployment frequency is the frequency of successful deployments to production over the given date range (hourly, daily, weekly, monthly, or yearly).

Software leaders can use the deployment frequency metric to understand how often the team successfully deploys software to production, and how quickly the teams can respond to customers’ requests or new market opportunities. High deployment frequency means you can get feedback sooner and iterate faster to deliver improvements and features.

How deployment frequency is calculated

In GitLab, Deployment frequency is measured by the average number of deployments per day to a given environment, based on the deployment’s end time (its finished_at property). GitLab calculates the deployment frequency from the number of finished deployments on the given day. Only successful deployments (Deployment.statuses = success) are counted.

The calculation takes into account the production environment tier or the environments named production/prod. The environment must be part of the production deployment tier for its deployment information to appear on the graphs.

How to improve deployment frequency

The first step is to benchmark the cadence of code releases between groups and projects. Next, you should consider:

  • Add more automated testing.
  • Add more automated code validation.
  • Break the changes down into smaller iterations.

Lead time for changes

Lead time for changes is the amount of time it takes a code change to get into production.

“Lead time for changes” is not the same as “Lead time”. In the value stream, “Lead time” measures the time it takes for work on an issue to move from the moment it’s requested (Issue created) to the moment it’s fulfilled and delivered (Issue closed).

For software leaders, Lead time for changes reflects the efficiency of CI/CD pipelines and visualizes how quickly work is delivered to customers. Over time, the lead time for changes should decrease, while your team’s performance should increase. Low lead time for changes means more efficient CI/CD pipelines. In GitLab, Lead time for changes is measure by the Median time it takes for a merge request to get merged into production (from master).

How lead time for changes is calculated

GitLab calculates Lead time for changes base on the number of seconds to successfully deliver a commit into production - from code committed to code successfully running in production, without adding the coding_time to the calculation.

How to improve lead time for changes

The first step is to benchmark the CI/CD pipelines’ efficiency between groups and projects. Next, you should consider:

  • Using Value Stream Analytics to identify bottlenecks in the processes.
  • Breaking the changes down into smaller iterations.
  • Adding more automation.

Time to restore service

Time to restore service is the amount of time it takes an organization to recover from a failure in production.

For software leaders, Time to restore service reflects how long it takes an organization to recover from a failure in production. Low Time to restore service means the organization can take risks with new innovative features to drive competitive advantages and increase business results.

How time to restore service is calculated

In GitLab, Time to restore service is measured as the median time an incident was open for on a production environment. GitLab calculates the number of seconds an incident was open on a production environment in the given time period. This assumes:

  • GitLab incidents are tracked.
  • All incidents are related to a production environment.
  • Incidents and deployments have a strictly one-to-one relationship. An incident is related to only one production deployment, and any production deployment is related to no more than one incident.

How to improve time to restore service

The first step is to benchmark the team response and recover from service interruptions and outages, between groups and projects. Next, you should consider:

  • Improving the observability into the production environment.
  • Improving response workflows.

Change failure rate

Change failure rate is how often a change cause failure in production.

Software leaders can use the change failure rate metric to gain insights into the quality of the code being shipped. High change failure rate may indicate an inefficient deployment process or insufficient automated testing coverage.

How change failure rate is calculated

In GitLab, Change failure rate is measured as the percentage of deployments that cause an incident in production in the given time period. GitLab calculates this by the number of incidents divided by the number of deployments to a production environment. This assumes:

  • GitLab incidents are tracked.
  • All incidents are related to a production environment.
  • Incidents and deployments have a strictly one-to-one relationship. An incident is related to only one production deployment, and any production deployment is related to no more than one incident.

How to improve change failure rate

The first step is to benchmark the quality and stability, between groups and projects.

To improve this metric, you should consider:

  • Finding the right balance between stability and throughput (Deployment frequency and Lead time for changes), and not sacrificing quality for speed.
  • Improving the efficacy of code review processes.
  • Adding more automated testing.

DORA metrics in GitLab

The DORA metrics are displayed on the following charts:

The table below provides an overview of the DORA metrics’ data aggregation in different charts.

Metric nameMeasured valuesData aggregation in the Value Streams Dashboard Data aggregation in CI/CD analytics charts Data aggregation in Custom insights reporting
Deployment frequencyNumber of successful deploymentsdaily average per monthdaily average day (default) or month
Lead time for changesNumber of seconds to successfully deliver a commit into productiondaily median per monthmedian time day (default) or month
Time to restore serviceNumber of seconds an incident was open fordaily median per monthdaily median day (default) or month
Change failure ratepercentage of deployments that cause an incident in productiondaily median per monthpercentage of failed deployments day (default) or month

Configure DORA metrics calculation

Introduced in GitLab 15.4 with a flag named dora_configuration. Disabled by default. This feature is in Beta.

On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, an administrator can enable the feature flag named dora_configuration. On GitLab.com, this feature is not available. This feature is not ready for production use.

You can configure the behavior of DORA metrics calculations. To do this, in the Rails console run the following command:

Dora::Configuration.create!(project: my_project, ltfc_target_branches: \['master', 'main'\])

This feature is in Beta.

Retrieve DORA metrics data

To retrieve DORA data, use the GraphQL or the REST APIs.

Measure DORA metrics without using GitLab CI/CD pipelines

Deployment frequency is calculated based on the deployments record, which is created for typical push-based deployments. These deployment records are not created for pull-based deployments, for example when Container Images are connected to GitLab with an agent.

To track DORA metrics in these cases, you can create a deployment record using the Deployments API. See also the documentation page for Track deployments of an external deployment tool.

Measure DORA metrics with Jira

Measure DORA Time to restore service and Change failure rate with external incidents

Time to restore service and Change failure rate require GitLab incidents to calculate the metrics.

For PagerDuty, you can set up a webhook to automatically create a GitLab incident for each PagerDuty incident. This configuration requires you to make changes in both PagerDuty and GitLab.

For others incident management tools, you can set up the HTTP integration, and use it to automatically:

  1. Create an incident when an alert is triggered.
  2. Close incidents via recovery alerts.

Supported DORA metrics in GitLab

MetricLevelAPIUI chartComments
deployment_frequencyProjectGitLab 13.7 and laterGitLab 14.8 and laterThe previous API endpoint was deprecated in 13.10.
deployment_frequencyGroupGitLab 13.10 and laterGitLab 13.12 and later 
lead_time_for_changesProjectGitLab 13.10 and laterGitLab 13.11 and laterUnit in seconds. Aggregation method is median.
lead_time_for_changesGroupGitLab 13.10 and laterGitLab 14.0 and laterUnit in seconds. Aggregation method is median.
time_to_restore_serviceProject and groupGitLab 14.9 and laterGitLab 15.1 and laterUnit in days. Aggregation method is median.
change_failure_rateProject and groupGitLab 14.10 and laterGitLab 15.2 and laterPercentage of deployments.