DevLake measures DORA on the project level. This guide provides step-by-step instructions for organizing projects in DevLake. It is intended for team leads and developers who want to track DORA metrics and optimize their workflow.
DORA are four metrics measuring engineering velocity and stability, which include:
deploy?pull requests resolved?incidents among all deployments in a project?incidents solved?As you can see, all four metrics are based on three core entities: pull requests, deployments, and incidents. Therefore, how to group these entities by DevLake project is the key to measure DORA precisely.
A DevLake project is a grouping of pull requests, incidents, or deployments. It can be seen as a real-world project or product line. DevLake measures DORA metrics for each project.
DevLake uses data scope such as repos, boards, cicd_scopes as the high-level entities to group pull requests, incidents, or deployments.
If you have a project like “project A” in the picture, create a DevLake project and configure those data scopes would get things done. However, things can be more complicated in real world because:
A repo, board, cicd_scope can be managed by multiple `projects`
For example:
This article will illustrate how to deal with these use cases.
Note: It does not matter if a project works on a particular repository more than another. The metrics are calculated over the entire set of repos, and the values are accumulated. More on that: Debugging DORA Issue Metrics.
In general, if you have 3 projects in your real life and you want to measure DORA metrics for all of them, create 3 DevLake projects.
If your team is contributing to multiple projects and you want to track DORA from the team perspective, please create a DevLake project for each project instead of for each team.
This section demonstrates real-life situations and how they get reflected in DevLake.
Disclaimer: To keep this guide shorter, some technical details are only mentioned in Use Case 1, so if you read this page for the first time, make sure to go through them in order.
Note: If you use webhooks, check the quick note about them below.
Apache Software Foundation (ASF) has and is developing many projects.
To take an example, assume that ASF wants to check the health of the development of these projects with DORA. And they need to analyze 2 projects: DevLake and Spark.
DevLake manages 3 repos: incubator-devlake, incubator-devlake-website, and incubator-devlake-helm-chart.
There are many repos related to Spark in one way or another. To keep it simple, they will also pick 3 repos: spark, spark-website, and incubator-livy.
Both projects use GitHub for storing code (including pull requests, deployments from GitHub Actions, and incidents from GitHub issues).
Note: To avoid the confusion between DevLake as a project in this use case and DevLake as a platform, the following sections will use complete names, i.e. project DevLake and platform DevLake respectively.
First, create two projects on the DevLake platform, one for DevLake and one for Spark. These will represent real-world projects.
Once these are created, the connections created in the following steps will be bound to them.
Since all data (pull requests, deployments, and incidents) is on GitHub in this case, they only need to create ONE GitHub connection, and add the project's repos to this connection.
If you store
incidentson Jira, for example, you will need to create a separate connection just for them. The same applies todeployments, a separate connection is needed in case they are stored in Jenkins (or any other host fordeployments).
After a connection is created, add/bind the connection to the project following the Tutorial.
Click Collect All Data in the project's blueprint to trigger the data collection and DORA calculation.
After the pipeline is finished, go to the DORA Dashboard to check if the metrics:
If everything goes well, you should see all 4 charts. If something is wrong, and you are puzzled as to why, check out the Debugging Dora Issue Metrics page.
In the same DORA dashboard check out this menu point:
The metrics should change when you select or deselect projects, representing the projects you selected.
Consider a scenario where a company operates with several teams, each managing one or more projects. For illustration, let us take two teams: the Payments team and the Internal Tools team to simplify the use case.
pull_requests, Jenkins to manage deployments, and Jira to manage incidents.pull_requests, Jenkins to manage deployments, and the team's own tool to manage incidents, so they use webhooks to push incidents to DevLake.✅ Create three projects: payments, it-legacy, and it-new.
❌ Create two projects: payments and internal-tools.
The second approach is not recommended for data accuracy. For example, the Change Failure Rate relies on the association between incidents and deployments under the same project in a chronological order. If a DevLake project “internal-tools” is created to measure DORA on a team level, the incidents in project A may be asscociated to a deployment in project B when calculating CFR; while the deployment in project B may have not caused any incidents. This will turn out to an inaccurate CFR.
Create just one connection and reuse it across projects by adding data scopes. This method optimizes data collection, minimizing redundancy and ensuring more efficient use of resources.
It is NOT recommended to create multiple connections, for instance, GitHub repos, as it will increase the time to collect the data due to the storage of multiple copies of shared repos in the database.
The only exception is the webhooks: users need to create 1 webhook per project, as this is the precise way to assignincidentsto the correspondingproject.
So, in total they will have to create following connections:
pull requests.deployments.incidents.incidents from each project: it-legacy and it-new.The step-by-step Configuration Guide shows how to add connections and data scopes.
Now, add the connections to each project with selected data scopes:
For project payments:
For project it-legacy:
For project it-new:
Click Collect All Data in the project's blueprint to trigger the data collection and DORA calculation.
After the pipeline is finished, go to the DORA Dashboard to check if the metrics:
If everything goes well, you should see all 4 charts. If something is wrong, and you are puzzled as to why, check out the Debugging Dora Issue Metrics page.
Assigning a UNIQUE webhook to each project is critical. This ensures that the DevLake platform correctly associates the incoming data with the corresponding project through the webhook.
If you use the same webhook across multiple projects, the data sent by it will be replicated per each project that uses that webhook. More information available on the Webhook page.
If you run into any problem, please check the Troubleshooting or create an issue