- View value stream analytics
- View time spent in each development stage
- View the lead time and cycle time for issues
- View lead time for changes for merge requests
- View number of successful deployments
- Access permissions for value stream analytics
- Troubleshooting
Value stream analytics for projects
- Introduced as cycle analytics prior to GitLab 12.3 at the project level.
- Introduced in GitLab Premium 12.3 at the group level.
- Renamed from cycle analytics to value stream analytics in GitLab 12.8.
Value stream analytics provides metrics about each stage of your software development process. For more information, see How value stream analytics measures stages.
A value stream is the entire work process that delivers value to customers. For example, the DevOps lifecycle is a value stream that starts with the Plan stage and ends with the Govern stage.
Use value stream analytics to identify:
- The amount of time it takes to go from an idea to production.
- The velocity of a given project.
- Bottlenecks in the development process.
- Factors that cause your software development lifecycle to slow down.
Value stream analytics is also available for groups.
View value stream analytics
- Filtering introduced in GitLab 14.3
- Sorting introduced in GitLab 14.4.
To view value stream analytics for your project:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Analytics > Value stream.
- To view metrics for a particular stage, select a stage below the Filter results text box.
- Optional. Filter the results:
- Select the Filter results text box.
- Select a parameter.
- Select a value or enter text to refine the results.
- To adjust the date range:
- In the From field, select a start date.
- In the To field, select an end date.
- Optional. Sort results by ascending or descending:
- To sort by most recent or oldest workflow item, select the Last event header.
- To sort by most or least amount of time spent in each stage, select the Duration header.
The table shows a list of related workflow items for the selected stage. Based on the stage you choose, this can be:
- CI/CD jobs
- Issues
- Merge requests
- Pipelines
A badge next to the workflow items table header shows the number of workflow items that completed the selected stage.
View time spent in each development stage
Value stream analytics shows the median time spent by issues or merge requests in each development stage.
To view the median time spent in each stage:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Analytics > Value stream.
- Optional. Filter the results:
- Select the Filter results text box.
- Select a parameter.
- Select a value or enter text to refine the results.
- To adjust the date range:
- In the From field, select a start date.
- In the To field, select an end date.
- To view the median time for each stage, above the Filter results text box, point to a stage.
View the lead time and cycle time for issues
Value stream analytics shows the lead time and cycle time for issues in your project:
- Lead time: Median time from when the issue was created to when it was closed.
- Cycle time: Median time from first commit to issue closed. GitLab measures cycle time from the earliest commit of a linked issue’s merge request to when that issue is closed. The cycle time approach underestimates the lead time because merge request creation is always later than commit time.
To view the lead time and cycle time for issues:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Analytics > Value stream.
- Optional. Filter the results:
- Select the Filter results text box.
- Select a parameter.
- Select a value or enter text to refine the results.
- To adjust the date range:
- In the From field, select a start date.
- In the To field, select an end date.
The Lead Time and Cycle Time metrics display below the Filter results text box.
View lead time for changes for merge requests
Introduced in GitLab 14.5.
Lead time for changes is the median duration between when a merge request is merged and when it’s deployed to production.
To view the lead time for changes for merge requests in your project:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Analytics > Value stream.
- Optional. Filter the results:
- Select the Filter results text box.
- Select a parameter.
- Select a value or enter text to refine the results.
- To adjust the date range:
- In the From field, select a start date.
- In the To field, select an end date.
The Lead Time for Changes metrics display below the Filter results text box.
View number of successful deployments
Prerequisites:
- To view deployment metrics, you must have a production environment configured.
Value stream analytics shows the following deployment metrics for your project within the specified date range:
- Deploys: The number of successful deployments in the date range.
- Deployment Frequency: The average number of successful deployments per day in the date range.
If you have a GitLab Premium or Ultimate subscription:
- The number of successful deployments is calculated with DORA data.
- The data is filtered based on environment and environment tier.
To view deployment metrics for your project:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Analytics > Value stream.
- Optional. Filter the results:
- Select the Filter results text box.
- Select a parameter.
- Select a value or enter text to refine the results.
- To adjust the date range:
- In the From field, select a start date.
- In the To field, select an end date.
The Deploys and Deployment Frequency metrics display below the Filter results text box.
Deployment metrics are calculated based on data from the DORA API.
Access permissions for value stream analytics
Access permissions for value stream analytics depend on the project type.
Project type | Permissions |
---|---|
Public | Anyone can access. |
Internal | Any authenticated user can access. |
Private | Any member Guest and above can access. |
Troubleshooting
100% CPU utilization by Sidekiq cronjob:analytics_cycle_analytics
It is possible that Value stream analytics background jobs strongly impact performance by monopolizing CPU resources.
To recover from this situation:
-
Disable the feature for all projects in the Rails console, and remove existing jobs:
Project.find_each do |p| p.analytics_access_level='disabled'; p.save! end Analytics::CycleAnalytics::GroupStage.delete_all Analytics::CycleAnalytics::Aggregation.delete_all
- Configure a Sidekiq routing
with for example a single
feature_category=value_stream_management
and multiplefeature_category!=value_stream_management
entries. Find other relevant queue metadata in the Enterprise Edition list. - Enable value stream analytics for one project after another. You might need to tweak the Sidekiq routing further according to your performance requirements.