Add `usage_count` data source and visualizations
What does this MR do and why?
As part of several steps to solving #467997 (closed), this MR adds the usage_count data source to query for a single Value Streams Dashboard count metric and return data fit for SingleStat visualization. It also creates visualization templates for each metric.
| Task | Status |
|---|---|
| Create a new visualization for namespace (!183096 (merged)) | |
Add usage_count data source and visualizations |
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Please make sure that you're on the GitLab Ultimate plan (if necessary, request a license).
- Add a few Usage Overview single stat visualizations to the group-level Value Streams Dashboard by applying the patch below
- Visit any group, then navigate to
Analyze > Analytics dashboardsin the menu - Select Value Streams Dashboard from the list
- Verify that the new single stat visualizations appear atop the dashboard and are rendering correctly
Add Usage Overview Single Stats
Diff
diff --git a/ee/lib/gitlab/analytics/value_stream_dashboard/dashboards/value_streams_dashboard.yaml b/ee/lib/gitlab/analytics/value_stream_dashboard/dashboards/value_streams_dashboard.yaml
index 73b6e8e281116..276312caef6bb 100644
--- a/ee/lib/gitlab/analytics/value_stream_dashboard/dashboards/value_streams_dashboard.yaml
+++ b/ee/lib/gitlab/analytics/value_stream_dashboard/dashboards/value_streams_dashboard.yaml
@@ -3,18 +3,58 @@ title: Value Streams Dashboard
description: Track key DevSecOps metrics throughout the development lifecycle.
version: "2"
panels:
- - visualization: usage_overview
- title: Usage overview for the %{namespaceName} %{namespaceType}
+ - visualization: groups_count
+ title: 'Groups usage count'
gridAttributes:
yPos: 0
xPos: 0
- width: 12
+ width: 4
+ height: 1
+ options: {}
+ - visualization: projects_count
+ title: 'Projects usage count'
+ gridAttributes:
+ yPos: 0
+ xPos: 4
+ width: 4
+ height: 1
+ options: {}
+ - visualization: users_count
+ title: 'Users usage count'
+ gridAttributes:
+ yPos: 0
+ xPos: 8
+ width: 4
+ height: 1
+ options: {}
+ - visualization: issues_count
+ title: 'Issues usage count'
+ gridAttributes:
+ yPos: 1
+ xPos: 0
+ width: 4
+ height: 1
+ options: {}
+ - visualization: merge_requests_count
+ title: 'Merge requests usage count'
+ gridAttributes:
+ yPos: 1
+ xPos: 4
+ width: 4
+ height: 1
+ options: {}
+ - visualization: pipelines_count
+ title: 'Pipelines usage count'
+ gridAttributes:
+ yPos: 1
+ xPos: 8
+ width: 4
height: 1
options: {}
- visualization: vsd_lifecycle_metrics_table
title: 'Lifecycle metrics for the %{namespaceName} %{namespaceType}'
gridAttributes:
- yPos: 1
+ yPos: 2
xPos: 0
width: 12
height: 5
@@ -22,7 +62,7 @@ panels:
- visualization: vsd_dora_metrics_table
title: 'DORA metrics for the %{namespaceName} %{namespaceType}'
gridAttributes:
- yPos: 6
+ yPos: 7
xPos: 0
width: 12
height: 3
@@ -30,7 +70,7 @@ panels:
- visualization: vsd_security_metrics_table
title: 'Security metrics for the %{namespaceName} %{namespaceType}'
gridAttributes:
- yPos: 9
+ yPos: 10
xPos: 0
width: 12
height: 2
@@ -38,7 +78,7 @@ panels:
- visualization: dora_performers_score
title: DORA performers score for the %{namespaceName} %{namespaceType} (Last full calendar month)
gridAttributes:
- yPos: 11
+ yPos: 12
xPos: 0
width: 12
height: 4
@@ -46,7 +86,7 @@ panels:
- visualization: dora_projects_comparison
title: Projects by DORA metric (Last full calendar month)
gridAttributes:
- yPos: 15
+ yPos: 16
xPos: 0
width: 12
height: 4
Related to #467997 (closed)
Edited by Rudy Crespo
