You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/03/12 12:04:07 UTC
(incubator-devlake) branch dora-drill-down2 updated: feat: update dora drill down
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch dora-drill-down2
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/dora-drill-down2 by this push:
new eab688eb5 feat: update dora drill down
eab688eb5 is described below
commit eab688eb577ecc9ab2f169d2a0b22f26da657c2d
Author: abeizn <zi...@merico.dev>
AuthorDate: Tue Mar 12 20:03:55 2024 +0800
feat: update dora drill down
---
grafana/dashboards/DORA.json | 99 +-
grafana/dashboards/DORAByTeam.json | 32 +-
.../dashboards/DORADetails-ChangeFailureRate.json | 753 +++++++++++
...n.json => DORADetails-DeploymentFrequency.json} | 1346 +++-----------------
.../DORADetails-FailedDeploymentRecoveryTime.json | 550 ++++++++
.../dashboards/DORADetails-LeadTimeforChanges.json | 1130 ++++++++++++++++
.../DORADetails-TimetoRestoreService.json | 455 +++++++
7 files changed, 3146 insertions(+), 1219 deletions(-)
diff --git a/grafana/dashboards/DORA.json b/grafana/dashboards/DORA.json
index b876191c1..a91bf8721 100644
--- a/grafana/dashboards/DORA.json
+++ b/grafana/dashboards/DORA.json
@@ -18,7 +18,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 37,
+ "id": 39,
"links": [],
"liveNow": false,
"panels": [
@@ -171,6 +171,36 @@
}
}
]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "/d/${__data.fields[\"metric_hidden\"]}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric_hidden"
+ },
+ "properties": [
+ {
+ "id": "custom.hidden",
+ "value": true
+ }
+ ]
}
]
},
@@ -181,13 +211,7 @@
"y": 7
},
"id": 8,
- "links": [
- {
- "targetBlank": true,
- "title": "overall drill down",
- "url": "/d/f33dfcb7-ce69-4dc7-b63f-1d9792e571dc/dora-drill-down?orgId=1"
- }
- ],
+ "links": [],
"options": {
"cellHeight": "sm",
"footer": {
@@ -211,7 +235,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
"refId": "A",
"select": [
[
@@ -326,8 +350,8 @@
"links": [
{
"targetBlank": false,
- "title": "dd",
- "url": "/d/f33dfcb7-ce69-4dc7-b63f-1d9792e571dc/dora-drill-down?orgId=1&viewPanel=15"
+ "title": "link",
+ "url": "/d/Deployment-frequency/dora-drill-down-deployment-frequency?orgId=1"
}
],
"options": {
@@ -469,8 +493,8 @@
"id": 12,
"links": [
{
- "title": "dd",
- "url": "/d/f33dfcb7-ce69-4dc7-b63f-1d9792e571dc/dora-drill-down?orgId=1&viewPanel=40"
+ "title": "link",
+ "url": "/d/Lead-time-for-changes/dora-drill-down-lead-time-for-changes?orgId=1"
}
],
"options": {
@@ -613,8 +637,8 @@
"id": 14,
"links": [
{
- "title": "dd",
- "url": "/d/f33dfcb7-ce69-4dc7-b63f-1d9792e571dc/dora-drill-down?orgId=1&viewPanel=44"
+ "title": "link",
+ "url": "/d/Change-failure-rate/dora-drill-down-change-failure-rate?orgId=1"
}
],
"options": {
@@ -761,8 +785,12 @@
"id": 17,
"links": [
{
- "title": "dd",
- "url": "/d/f33dfcb7-ce69-4dc7-b63f-1d9792e571dc/dora-drill-down?orgId=1&viewPanel=44"
+ "title": "Failed Deployment Recovery Time",
+ "url": "/d/Failed-deployment-recovery-time/dora-details-failed-deployment-recovery-time?orgId=1"
+ },
+ {
+ "title": "Median Time to Restore Service",
+ "url": "/d/Time-to-restore-service/dora-details-median-time-to-restore-service?orgId=1"
}
],
"options": {
@@ -886,7 +914,12 @@
"y": 18
},
"id": 2,
- "links": [],
+ "links": [
+ {
+ "title": "link",
+ "url": "/d/Deployment-frequency/dora-drill-down-deployment-frequency?orgId=1"
+ }
+ ],
"options": {
"barRadius": 0,
"barWidth": 0.6,
@@ -1011,7 +1044,12 @@
"y": 18
},
"id": 6,
- "links": [],
+ "links": [
+ {
+ "title": "link",
+ "url": "/d/Lead-time-for-changes/dora-drill-down-lead-time-for-changes?orgId=1"
+ }
+ ],
"options": {
"barRadius": 0,
"barWidth": 0.7,
@@ -1156,7 +1194,12 @@
"y": 26
},
"id": 5,
- "links": [],
+ "links": [
+ {
+ "title": "link",
+ "url": "/d/Change-failure-rate/dora-drill-down-change-failure-rate?orgId=1"
+ }
+ ],
"options": {
"barRadius": 0,
"barWidth": 0.6,
@@ -1305,7 +1348,16 @@
"y": 26
},
"id": 9,
- "links": [],
+ "links": [
+ {
+ "title": "Failed Deployment Recovery Time",
+ "url": "/d/Failed-deployment-recovery-time/dora-details-failed-deployment-recovery-time?orgId=1"
+ },
+ {
+ "title": "Median Time To Restore Service",
+ "url": "/d/Time-to-restore-service/dora-details-median-time-to-restore-service?orgId=1"
+ }
+ ],
"options": {
"barRadius": 0,
"barWidth": 0.6,
@@ -1388,7 +1440,8 @@
"style": "dark",
"tags": [
"Engineering Leads Dashboard",
- "Highlights"
+ "Highlights",
+ "DORA"
],
"templating": {
"list": [
@@ -1469,6 +1522,6 @@
"timezone": "",
"title": "DORA",
"uid": "qNo8_0M4z",
- "version": 16,
+ "version": 7,
"weekStart": ""
}
\ No newline at end of file
diff --git a/grafana/dashboards/DORAByTeam.json b/grafana/dashboards/DORAByTeam.json
index 2757649d1..92741ed84 100644
--- a/grafana/dashboards/DORAByTeam.json
+++ b/grafana/dashboards/DORAByTeam.json
@@ -24,7 +24,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 18,
+ "id": 45,
"links": [],
"liveNow": false,
"panels": [
@@ -685,7 +685,7 @@
"calcs": [
"lastNotNull"
],
- "fields": "/^median_time_to_resolve$/",
+ "fields": "/^median_time_in_hour$/",
"values": false
},
"text": {},
@@ -969,8 +969,7 @@
"mode": "percentage",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
}
]
},
@@ -1090,8 +1089,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
},
{
"color": "red",
@@ -1101,23 +1099,7 @@
},
"unit": "none"
},
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "median_time_to_resolve_in_hour"
- },
- "properties": [
- {
- "id": "color",
- "value": {
- "fixedColor": "blue",
- "mode": "fixed"
- }
- }
- ]
- }
- ]
+ "overrides": []
},
"gridPos": {
"h": 8,
@@ -1157,7 +1139,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n\t\tJOIN commits c on cdc.commit_sha = c.sha\n\tjoin user_accounts ua on c.author_id = ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on u.id = tu.user_id\n join tea [...]
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n\t\tJOIN commits c on cdc.commit_sha = c.sha\n\tjoin user_accounts ua on c.author_id = ua.account_id\n join users u on ua.user_id = u.id\n join team_users tu on u.id = tu.user_id\n join tea [...]
"refId": "A",
"sql": {
"columns": [
@@ -1263,6 +1245,6 @@
"timezone": "",
"title": "DORA (by Team)",
"uid": "66YkL8y4z",
- "version": 5,
+ "version": 4,
"weekStart": ""
}
\ No newline at end of file
diff --git a/grafana/dashboards/DORADetails-ChangeFailureRate.json b/grafana/dashboards/DORADetails-ChangeFailureRate.json
new file mode 100644
index 000000000..5c7c0de28
--- /dev/null
+++ b/grafana/dashboards/DORADetails-ChangeFailureRate.json
@@ -0,0 +1,753 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "id": 40,
+ "links": [
+ {
+ "asDropdown": false,
+ "icon": "bolt",
+ "includeVars": false,
+ "keepTime": true,
+ "tags": [],
+ "targetBlank": false,
+ "title": "Go Back",
+ "tooltip": "",
+ "type": "link",
+ "url": "/d/qNo8_0M4z2/dora2?orgId=1"
+ }
+ ],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "gridPos": {
+ "h": 2,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 63,
+ "links": [],
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "This dashboard is designed to find the details about [Change Failure Rate](https://devlake.apache.org/docs/Metrics/CFR) in DORA.",
+ "mode": "markdown"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Dashboard Introduction",
+ "type": "text"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "pattern": ".*elite.*",
+ "result": {
+ "color": "purple",
+ "index": 0
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*high.*",
+ "result": {
+ "color": "green",
+ "index": 1
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*medium.*",
+ "result": {
+ "color": "yellow",
+ "index": 2
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*low.*",
+ "result": {
+ "color": "red",
+ "index": 3
+ }
+ },
+ "type": "regex"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 4,
+ "x": 0,
+ "y": 2
+ },
+ "id": 86,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "1. Change Failure Rate",
+ "type": "gauge"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgba(255, 255, 255, 1)",
+ "mode": "fixed"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "mode": "gradient",
+ "type": "color-background"
+ },
+ "filterable": true,
+ "inspect": false
+ },
+ "mappings": [
+ {
+ "options": {
+ "FALSE": {
+ "color": "red",
+ "index": 1
+ },
+ "TRUE": {
+ "color": "green",
+ "index": 0
+ }
+ },
+ "type": "value"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "incident_id"
+ },
+ "properties": [
+ {
+ "id": "custom.width",
+ "value": 134
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "deployment_finished_date"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.width",
+ "value": 271
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "created_date"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "url"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": true,
+ "title": "",
+ "url": "${__data.fields[\"metric_hidden\"]}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric_hidden"
+ },
+ "properties": [
+ {
+ "id": "custom.hidden",
+ "value": true
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 17,
+ "w": 20,
+ "x": 4,
+ "y": 2
+ },
+ "id": 85,
+ "links": [
+ {
+ "title": "docs",
+ "url": "https://devlake.apache.org/docs/Metrics/CFR/#how-is-it-calculated"
+ }
+ ],
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": true,
+ "sortBy": []
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "3. Deployment Related Incident",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "pattern": ".*elite.*",
+ "result": {
+ "color": "purple",
+ "index": 0
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*high.*",
+ "result": {
+ "color": "green",
+ "index": 1
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*medium.*",
+ "result": {
+ "color": "yellow",
+ "index": 2
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*low.*",
+ "result": {
+ "color": "red",
+ "index": 3
+ }
+ },
+ "type": "regex"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 11,
+ "w": 4,
+ "x": 0,
+ "y": 8
+ },
+ "id": 84,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "2. Incident and Deployment Count",
+ "type": "gauge"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgba(255, 255, 255, 1)",
+ "mode": "fixed"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "mode": "basic",
+ "type": "color-background"
+ },
+ "filterable": true,
+ "inspect": false
+ },
+ "mappings": [
+ {
+ "options": {
+ "DEPLOYMENT": {
+ "color": "green",
+ "index": 0
+ },
+ "INCIDENT": {
+ "color": "red",
+ "index": 1
+ }
+ },
+ "type": "value"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 10,
+ "w": 24,
+ "x": 0,
+ "y": 19
+ },
+ "id": 58,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "See detail logic",
+ "url": "https://devlake.apache.org/docs/Metrics/CFR#how-is-it-calculated"
+ }
+ ],
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": true,
+ "sortBy": []
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "with _deployments as(\n select distinct \n d.cicd_deployment_id as deployment_id,\n d.result,\n d.environment,\n d.finished_date,\n d.cicd_scope_id,\n pm.project_name\n from \n cicd_deployment_commits d\n join project_mapping pm on d.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n where \n -- only result needs to specified, not envioronment\n d.result = 'SUCCESS'\n -- cho [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "4. How incidents are associated with deployments",
+ "type": "table"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "All",
+ "value": "$__all"
+ },
+ "datasource": "mysql",
+ "definition": "select distinct name from projects",
+ "hide": 0,
+ "includeAll": true,
+ "label": "Project",
+ "multi": true,
+ "name": "project",
+ "options": [],
+ "query": "select distinct name from projects",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "current": {
+ "selected": false,
+ "text": "2023",
+ "value": "2023"
+ },
+ "datasource": "mysql",
+ "definition": "select dora_report from dora_benchmarks",
+ "hide": 0,
+ "includeAll": false,
+ "label": "DORA Report",
+ "multi": false,
+ "name": "dora_report",
+ "options": [],
+ "query": "select dora_report from dora_benchmarks",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "current": {
+ "selected": false,
+ "text": "Failed Deployment Recovery Time",
+ "value": "Failed Deployment Recovery Time"
+ },
+ "datasource": "mysql",
+ "definition": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
+ "hide": 2,
+ "includeAll": false,
+ "label": "TitleValue",
+ "multi": false,
+ "name": "title_value",
+ "options": [],
+ "query": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6M",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "DORA Details - Change Failure Rate",
+ "uid": "Change-failure-rate",
+ "version": 12,
+ "weekStart": ""
+}
\ No newline at end of file
diff --git a/grafana/dashboards/DORADrillDown.json b/grafana/dashboards/DORADetails-DeploymentFrequency.json
similarity index 50%
rename from grafana/dashboards/DORADrillDown.json
rename to grafana/dashboards/DORADetails-DeploymentFrequency.json
index 23cca877a..5312c4099 100644
--- a/grafana/dashboards/DORADrillDown.json
+++ b/grafana/dashboards/DORADetails-DeploymentFrequency.json
@@ -18,8 +18,21 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
- "id": 35,
- "links": [],
+ "id": 41,
+ "links": [
+ {
+ "asDropdown": false,
+ "icon": "bolt",
+ "includeVars": false,
+ "keepTime": true,
+ "tags": [],
+ "targetBlank": false,
+ "title": "Go Back",
+ "tooltip": "",
+ "type": "link",
+ "url": "/d/qNo8_0M4z2/dora2?orgId=1"
+ }
+ ],
"liveNow": false,
"panels": [
{
@@ -28,7 +41,7 @@
"uid": "grafana"
},
"gridPos": {
- "h": 3,
+ "h": 2,
"w": 24,
"x": 0,
"y": 0
@@ -41,7 +54,7 @@
"showLineNumbers": false,
"showMiniMap": false
},
- "content": "This dashboard is designed to explore [DORA](/grafana/d/qNo8_0M4z/dora?orgId=1) and find more details.",
+ "content": "This dashboard is designed to find the details about [deployment frequency](https://devlake.apache.org/docs/Metrics/DeploymentFrequency) in DORA.",
"mode": "markdown"
},
"pluginVersion": "9.5.15",
@@ -58,17 +71,6 @@
"title": "Dashboard Introduction",
"type": "text"
},
- {
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 3
- },
- "id": 83,
- "title": "1. Check \"Deployment Frequency\"",
- "type": "row"
- },
{
"datasource": "mysql",
"description": "",
@@ -84,6 +86,7 @@
"mode": "basic",
"type": "color-background"
},
+ "filterable": true,
"inspect": false
},
"mappings": [
@@ -182,7 +185,7 @@
"h": 15,
"w": 17,
"x": 0,
- "y": 4
+ "y": 2
},
"id": 79,
"links": [],
@@ -203,12 +206,13 @@
"targets": [
{
"datasource": "mysql",
+ "editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "with _deployment_commit_rank as(\n SELECT\n \tpm.project_name,\n \tIF(cdc._raw_data_table != '', cdc._raw_data_table, cdc.cicd_scope_id) as _raw_data_table,\n \tcdc.id,\n \tcdc.cicd_deployment_id,\n \tcdc.cicd_scope_id,\n \tresult,\n \tenvironment,\n finished_date,\n row_number() over(partition by cdc.cicd_deployment_id order by finished_date desc) as _deployment_commit_rank\n FROM cicd_deployment_commits cdc\n left join project_mapping pm on cdc.cicd [...]
+ "rawSql": "with _deployment_commit_rank as(\n SELECT\n \tpm.project_name,\n \tIF(cdc._raw_data_table != '', cdc._raw_data_table, cdc.cicd_scope_id) as _raw_data_table,\n \tcdc.id,\n \tcdc.cicd_deployment_id,\n \tcdc.cicd_scope_id,\n \tresult,\n \tenvironment,\n finished_date,\n row_number() over(partition by cdc.cicd_deployment_id order by finished_date desc) as _deployment_commit_rank\n FROM cicd_deployment_commits cdc\n left join project_mapping pm on cdc.cicd [...]
"refId": "A",
"select": [
[
@@ -220,6 +224,23 @@
}
]
],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
"table": "_devlake_tasks",
"timeColumn": "created_at",
"timeColumnType": "timestamp",
@@ -232,7 +253,7 @@
]
}
],
- "title": "Figure 1 - Deployment list in the selected project(s)",
+ "title": "1. Deployment list in the selected project(s)",
"type": "table"
},
{
@@ -283,7 +304,7 @@
"h": 15,
"w": 7,
"x": 17,
- "y": 4
+ "y": 2
},
"id": 75,
"links": [],
@@ -310,7 +331,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "with _deployment_commit_rank as(\n SELECT\n \tpm.project_name,\n \tIF(cdc._raw_data_table != '', cdc._raw_data_table, cdc.cicd_scope_id) as _raw_data_table,\n \tcdc.id,\n \tcdc.cicd_deployment_id,\n \tcdc.cicd_scope_id,\n \tresult,\n \tenvironment,\n finished_date,\n row_number() over(partition by cdc.cicd_deployment_id order by finished_date desc) as _deployment_commit_rank\n FROM cicd_deployment_commits cdc\n left join project_mapping pm on cdc.cicd [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nWITH last_few_calendar_days AS (\n -- Construct the last few calendar days within the selected time period in the top-right corner\n SELECT CAST(($__timeTo() - INTERVAL (H + T + U) DAY) AS date) AS day\n FROM (\n SELECT 0 H\n UNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n ) H\n CROSS JOIN (\n SELECT 0 T\n UNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n UNION ALL SELECT 40 UNION ALL [...]
"refId": "A",
"select": [
[
@@ -351,7 +372,7 @@
]
}
],
- "title": "1.1 Daily deployments in the selected project(s)",
+ "title": "2. Daily deployments in the selected project(s)",
"type": "table"
},
{
@@ -402,7 +423,7 @@
"h": 8,
"w": 24,
"x": 0,
- "y": 19
+ "y": 17
},
"id": 74,
"links": [],
@@ -478,7 +499,7 @@
]
}
],
- "title": "1.2 Weekly deployments in the selected project(s)",
+ "title": "3. Weekly deployments in the selected project(s)",
"type": "barchart"
},
{
@@ -514,8 +535,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
},
{
"color": "red",
@@ -530,7 +550,7 @@
"h": 8,
"w": 12,
"x": 0,
- "y": 27
+ "y": 25
},
"id": 76,
"links": [],
@@ -607,7 +627,7 @@
]
}
],
- "title": "1.3 Per month deployments in the selected project(s)",
+ "title": "4. Per month deployments in the selected project(s)",
"type": "barchart"
},
{
@@ -643,8 +663,7 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "green"
},
{
"color": "#EAB839",
@@ -659,7 +678,7 @@
"h": 8,
"w": 12,
"x": 12,
- "y": 27
+ "y": 25
},
"id": 77,
"links": [],
@@ -735,9 +754,34 @@
]
}
],
- "title": "1.4 Per semi-annual deployments in the selected project(s)",
+ "title": "5. Per six months deployments in the selected project(s)",
"type": "barchart"
},
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "gridPos": {
+ "h": 9,
+ "w": 6,
+ "x": 0,
+ "y": 33
+ },
+ "id": 93,
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "# 2023 Benchmarks\n- Elite: >= 7 days per week\n- High: >= 7 days per week\n- Medium: >= 1 days per month\n- Low: < 1 days per month\n# 2021 Benchmarks\n- Elite: >= 7 days per week\n- High: >= 1 days per month\n- Medium: >= 1 days per six months\n- Low: < 1 days per six months",
+ "mode": "markdown"
+ },
+ "pluginVersion": "9.5.15",
+ "title": "DORA Report",
+ "type": "text"
+ },
{
"datasource": "mysql",
"description": "",
@@ -792,33 +836,33 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "#a6a6a6"
}
]
- }
+ },
+ "unit": "days per week"
},
"overrides": []
},
"gridPos": {
- "h": 8,
- "w": 24,
- "x": 0,
- "y": 35
+ "h": 9,
+ "w": 6,
+ "x": 6,
+ "y": 33
},
- "id": 15,
+ "id": 90,
"links": [],
"options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": [],
"fields": "",
"values": false
},
- "showThresholdLabels": false,
- "showThresholdMarkers": true
+ "textMode": "auto"
},
"pluginVersion": "9.5.15",
"targets": [
@@ -830,7 +874,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
"refId": "A",
"select": [
[
@@ -871,34 +915,8 @@
]
}
],
- "title": "1.5 - Median deployments days at daily/weekly/monthly/semi-annually level",
- "type": "gauge"
- },
- {
- "collapsed": false,
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 43
- },
- "id": 20,
- "panels": [],
- "targets": [
- {
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "refId": "A"
- }
- ],
- "title": "2. Check \"Median Lead Time for Changes\"",
- "type": "row"
+ "title": "6. Median deployments days at the weekly level",
+ "type": "stat"
},
{
"datasource": "mysql",
@@ -908,99 +926,79 @@
"color": {
"mode": "thresholds"
},
- "custom": {
- "align": "auto",
- "cellOptions": {
- "type": "auto"
+ "mappings": [
+ {
+ "options": {
+ "pattern": ".*elite.*",
+ "result": {
+ "color": "purple",
+ "index": 0
+ }
+ },
+ "type": "regex"
},
- "inspect": false
- },
- "mappings": [],
+ {
+ "options": {
+ "pattern": ".*high.*",
+ "result": {
+ "color": "green",
+ "index": 1
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*medium.*",
+ "result": {
+ "color": "yellow",
+ "index": 2
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*low.*",
+ "result": {
+ "color": "red",
+ "index": 3
+ }
+ },
+ "type": "regex"
+ }
+ ],
"thresholds": {
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "ranks"
- },
- "properties": [
- {
- "id": "mappings",
- "value": [
- {
- "options": {
- "from": 0,
- "result": {
- "color": "green",
- "index": 0
- },
- "to": 0.5
- },
- "type": "range"
- },
- {
- "options": {
- "from": 0.5,
- "result": {
- "color": "orange",
- "index": 1
- },
- "to": 1
- },
- "type": "range"
- }
- ]
- },
- {
- "id": "custom.cellOptions",
- "value": {
- "type": "color-text"
- }
+ "color": "#a6a6a6"
}
]
},
- {
- "matcher": {
- "id": "byName",
- "options": "month"
- },
- "properties": [
- {
- "id": "custom.filterable",
- "value": true
- }
- ]
- }
- ]
+ "unit": "days per month"
+ },
+ "overrides": []
},
"gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 44
+ "h": 9,
+ "w": 6,
+ "x": 12,
+ "y": 33
},
- "id": 70,
+ "id": 91,
"links": [],
"options": {
- "cellHeight": "sm",
- "footer": {
- "countRows": true,
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [],
"fields": "",
- "reducer": [
- "count"
- ],
- "show": true
+ "values": false
},
- "showHeader": true
+ "textMode": "auto"
},
"pluginVersion": "9.5.15",
"targets": [
@@ -1009,10 +1007,10 @@
"editorMode": "code",
"format": "table",
"group": [],
- "hide": false,
"metricColumn": "none",
+ "queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "with _pr_stats as (\n-- get the cycle time of PRs deployed by the deployments finished each month\n\tSELECT\n\t\tdistinct\n\t\tpr.id,\n\t\tpr.title,\n\t\tpr.url,\n\t\tpr.created_date,\n\t\tppm.first_commit_sha,\n\t\tprc.commit_authored_date,\n\t\tcdc.cicd_deployment_id,\n\t\tcdc.name, \n\t\tcdc.finished_date,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjoin project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on pr.base_repo_id = pm.row [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
"refId": "A",
"select": [
[
@@ -1041,8 +1039,8 @@
],
"limit": 50
},
- "table": "ae_projects",
- "timeColumn": "ae_create_time",
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
"timeColumnType": "timestamp",
"where": [
{
@@ -1053,11 +1051,12 @@
]
}
],
- "title": "Figure 2 - Median Change Lead Time Details",
- "type": "table"
+ "title": "7. Median deployments days at monthly level",
+ "type": "stat"
},
{
"datasource": "mysql",
+ "description": "",
"fieldConfig": {
"defaults": {
"color": {
@@ -1109,88 +1108,36 @@
"mode": "absolute",
"steps": [
{
- "color": "green",
- "value": null
+ "color": "#a6a6a6"
}
]
- }
+ },
+ "unit": "days per six months"
},
"overrides": []
},
"gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 51
+ "h": 9,
+ "w": 6,
+ "x": 18,
+ "y": 33
},
- "id": 40,
+ "id": 92,
"links": [],
"options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": [],
"fields": "",
"values": false
},
- "showThresholdLabels": false,
- "showThresholdMarkers": true
+ "textMode": "auto"
},
"pluginVersion": "9.5.15",
"targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "select \n count(distinct pr.id) as 'All PRs'\nfrom \n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\nwhere \n pm.project_name in ($project)\n ",
- "refId": "D",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
- },
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "select \n count(distinct pr.id) as 'Merged PRs'\nfrom \n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\nwhere \n pm.project_name in ($project)\n and pr.merged_date is not null\n ",
- "refId": "B",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
- },
{
"datasource": "mysql",
"editorMode": "code",
@@ -1199,7 +1146,7 @@
"metricColumn": "none",
"queryType": "randomWalk",
"rawQuery": true,
- "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats as (\n-- get the cycle time of PRs deployed by the deployments finished in the selected period\n\tSELECT\n\t\tdistinct pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr \n\t\tjoin project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin cicd_deployment_commits cdc on ppm.deployment_commit_id = cdc.id\n\tWHERE\n\t pm.proje [...]
+ "rawSql": "-- Metric 1: Deployment Frequency\nwith last_few_calendar_months as(\n-- construct the last few calendar months within the selected time period in the top-right corner\n\tSELECT CAST(($__timeTo()-INTERVAL (H+T+U) DAY) AS date) day\n\tFROM ( SELECT 0 H\n\t\t\tUNION ALL SELECT 100 UNION ALL SELECT 200 UNION ALL SELECT 300\n\t\t) H CROSS JOIN ( SELECT 0 T\n\t\t\tUNION ALL SELECT 10 UNION ALL SELECT 20 UNION ALL SELECT 30\n\t\t\tUNION ALL SELECT 40 UNION ALL SELECT [...]
"refId": "A",
"select": [
[
@@ -1238,953 +1185,10 @@
"type": "macro"
}
]
- },
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
- "refId": "C",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
- }
- ],
- "title": "2.1 - Overall Status Of Median Lead Time for Changes",
- "type": "gauge"
- },
- {
- "collapsed": false,
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 58
- },
- "id": 28,
- "panels": [],
- "targets": [
- {
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "refId": "A"
- }
- ],
- "title": "3. Check \"Change Failure Rate\"",
- "type": "row"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [
- {
- "options": {
- "pattern": ".*elite.*",
- "result": {
- "color": "purple",
- "index": 0
- }
- },
- "type": "regex"
- },
- {
- "options": {
- "pattern": ".*high.*",
- "result": {
- "color": "green",
- "index": 1
- }
- },
- "type": "regex"
- },
- {
- "options": {
- "pattern": ".*medium.*",
- "result": {
- "color": "yellow",
- "index": 2
- }
- },
- "type": "regex"
- },
- {
- "options": {
- "pattern": ".*low.*",
- "result": {
- "color": "red",
- "index": 3
- }
- },
- "type": "regex"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 24,
- "x": 0,
- "y": 59
- },
- "id": 84,
- "links": [],
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- },
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Figure 3 - Overall Status Of Median Lead Time for Changes",
- "type": "gauge"
- },
- {
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 0,
- "y": 66
- },
- "id": 81,
- "links": [],
- "options": {
- "code": {
- "language": "plaintext",
- "showLineNumbers": false,
- "showMiniMap": false
- },
- "content": "<img src = 'https://devlake.apache.org/assets/images/cfr-definition-94d92cc75f857f183443ad5390d31d65.png' />\n\n- In this case:\n - Deployment-1 maps to Incident-1\n - Deployment-3 maps to Incident-2 and Incident-3\n - Deployment-2,4,5 doesn't map to any Incident",
- "mode": "markdown"
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "queryType": "randomWalk",
- "refId": "A"
- }
- ],
- "title": "Deployment - Incident Mapping and CFR calculation logic",
- "type": "text"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgba(255, 255, 255, 1)",
- "mode": "fixed"
- },
- "custom": {
- "align": "auto",
- "cellOptions": {
- "mode": "basic",
- "type": "color-background"
- },
- "filterable": true,
- "inspect": false
- },
- "mappings": [
- {
- "options": {
- "DEPLOYMENT": {
- "color": "green",
- "index": 0
- },
- "INCIDENT": {
- "color": "red",
- "index": 1
- }
- },
- "type": "value"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 10,
- "w": 12,
- "x": 12,
- "y": 66
- },
- "id": 58,
- "links": [],
- "options": {
- "cellHeight": "sm",
- "footer": {
- "countRows": false,
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "with _deployments as(\n select distinct \n d.cicd_deployment_id as deployment_id,\n d.result,\n d.environment,\n d.finished_date,\n d.cicd_scope_id,\n pm.project_name\n from \n cicd_deployment_commits d\n join project_mapping pm on d.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n where \n -- only result needs to specified, not envioronment\n d.result = 'SUCCESS'\n -- cho [...]
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- },
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "3.1 The sequence of DEPLOYMENTS and INCIDENTS",
- "type": "table"
- },
- {
- "collapsed": false,
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "gridPos": {
- "h": 1,
- "w": 24,
- "x": 0,
- "y": 76
- },
- "id": 26,
- "panels": [],
- "targets": [
- {
- "datasource": {
- "type": "datasource",
- "uid": "grafana"
- },
- "refId": "A"
- }
- ],
- "title": "4. \"${title_value}\"",
- "type": "row"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgba(255, 255, 255, 1)",
- "mode": "fixed"
- },
- "custom": {
- "align": "auto",
- "cellOptions": {
- "mode": "gradient",
- "type": "color-background"
- },
- "filterable": true,
- "inspect": false
- },
- "mappings": [
- {
- "options": {
- "FALSE": {
- "color": "red",
- "index": 1
- },
- "TRUE": {
- "color": "green",
- "index": 0
- }
- },
- "type": "value"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 16,
- "w": 24,
- "x": 0,
- "y": 77
- },
- "id": 85,
- "links": [],
- "options": {
- "cellHeight": "sm",
- "footer": {
- "countRows": false,
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "-- Metric 3: change failure rate\nwith _deployments as (\n-- When deploying multiple commits in one pipeline, GitLab and BitBucket may generate more than one deployment. However, DevLake consider these deployments as ONE production deployment and use the last one's finished_date as the finished date.\n\tSELECT\n\t\tcdc.cicd_deployment_id as deployment_id,\n\t\tmax(cdc.finished_date) as deployment_finished_date\n\tFROM \n\t\tcicd_deployment_commits cdc\n\t\tJOIN proje [...]
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- },
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Figure 4. Deployments and Incidents Details",
- "type": "table"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgba(255, 255, 255, 1)",
- "mode": "fixed"
- },
- "custom": {
- "align": "auto",
- "cellOptions": {
- "mode": "gradient",
- "type": "color-background"
- },
- "filterable": true,
- "inspect": false
- },
- "mappings": [
- {
- "options": {
- "FALSE": {
- "color": "red",
- "index": 1
- },
- "TRUE": {
- "color": "green",
- "index": 0
- }
- },
- "type": "value"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 12,
- "w": 17,
- "x": 0,
- "y": 93
- },
- "id": 80,
- "links": [],
- "options": {
- "cellHeight": "sm",
- "footer": {
- "countRows": false,
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "frameIndex": 1,
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- },
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "4.1 Failed deployment recovery time details(2023 dora report)",
- "type": "table"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 7,
- "x": 17,
- "y": 93
- },
- "id": 44,
- "links": [],
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "/.*/",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
- "refId": "D",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
- }
- ],
- "title": "4.3 Deployment Count",
- "type": "gauge"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 7,
- "w": 7,
- "x": 17,
- "y": 102
- },
- "id": 88,
- "links": [],
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "/.*/",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
- "refId": "D",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
- }
- ],
- "title": "4.4 Incident Count",
- "type": "gauge"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "rgba(255, 255, 255, 1)",
- "mode": "fixed"
- },
- "custom": {
- "align": "auto",
- "cellOptions": {
- "mode": "gradient",
- "type": "color-background"
- },
- "filterable": true,
- "inspect": false
- },
- "mappings": [
- {
- "options": {
- "FALSE": {
- "color": "red",
- "index": 1
- },
- "TRUE": {
- "color": "green",
- "index": 0
- }
- },
- "type": "value"
- }
- ],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 12,
- "w": 17,
- "x": 0,
- "y": 105
- },
- "id": 86,
- "links": [],
- "options": {
- "cellHeight": "sm",
- "footer": {
- "countRows": false,
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "frameIndex": 1,
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "queryType": "randomWalk",
- "rawQuery": true,
- "rawSql": "-- ***** 2021 report ***** --\n-- Metric 4: Median time to restore service \nwith _incidents as (\n-- get the incidents created within the selected time period in the top-right corner\n\tSELECT\n\t distinct i.id as \"incident_id\",\n i.resolution_date,\n i.created_date,\n\t cast(lead_time_minutes as signed) as lead_time_minutes\n\tFROM\n\t\tissues i\n\t join board_issues bi on i.id = bi.issue_id\n\t join boards b on bi.board_id = b.id\n\t join project [...]
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "id"
- ],
- "type": "column"
- }
- ]
- ],
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- },
- "table": "_devlake_tasks",
- "timeColumn": "created_at",
- "timeColumnType": "timestamp",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "4.2 Median time to restore service details(2021 dora report)",
- "type": "table"
- },
- {
- "datasource": "mysql",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 17,
- "y": 109
- },
- "id": 87,
- "links": [],
- "options": {
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "/.*/",
- "values": false
- },
- "showThresholdLabels": false,
- "showThresholdMarkers": true
- },
- "pluginVersion": "9.5.15",
- "targets": [
- {
- "datasource": "mysql",
- "editorMode": "code",
- "format": "table",
- "hide": false,
- "rawQuery": true,
- "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
- "refId": "D",
- "sql": {
- "columns": [
- {
- "parameters": [],
- "type": "function"
- }
- ],
- "groupBy": [
- {
- "property": {
- "type": "string"
- },
- "type": "groupBy"
- }
- ],
- "limit": 50
- }
}
],
- "title": "4.5 ${title_value} In Hour",
- "type": "gauge"
+ "title": "8. Median deployments days at per six months level",
+ "type": "stat"
}
],
"refresh": "",
@@ -2264,8 +1268,8 @@
},
"timepicker": {},
"timezone": "",
- "title": "DORA DRILL DOWN",
- "uid": "f33dfcb7-ce69-4dc7-b63f-1d9792e571dc",
- "version": 30,
+ "title": "DORA Details - Deployment Frequency",
+ "uid": "Deployment-frequency",
+ "version": 8,
"weekStart": ""
}
\ No newline at end of file
diff --git a/grafana/dashboards/DORADetails-FailedDeploymentRecoveryTime.json b/grafana/dashboards/DORADetails-FailedDeploymentRecoveryTime.json
new file mode 100644
index 000000000..f5a8d6afb
--- /dev/null
+++ b/grafana/dashboards/DORADetails-FailedDeploymentRecoveryTime.json
@@ -0,0 +1,550 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "id": 42,
+ "links": [
+ {
+ "asDropdown": false,
+ "icon": "bolt",
+ "includeVars": false,
+ "keepTime": true,
+ "tags": [],
+ "targetBlank": false,
+ "title": "Go Back ",
+ "tooltip": "",
+ "type": "link",
+ "url": "/d/qNo8_0M4z2/dora2?orgId=1"
+ }
+ ],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "gridPos": {
+ "h": 2,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 63,
+ "links": [],
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "This dashboard is designed to find the details about [Failed Deployment Recovery Time\n](https://devlake.apache.org/docs/Metrics/MTTR) in DORA.",
+ "mode": "markdown"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Dashboard Introduction",
+ "type": "text"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 4,
+ "x": 0,
+ "y": 2
+ },
+ "id": 87,
+ "links": [],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "1. Failed Deployment Recovery Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgba(255, 255, 255, 1)",
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": true,
+ "inspect": false
+ },
+ "mappings": [
+ {
+ "options": {
+ "FALSE": {
+ "color": "red",
+ "index": 1
+ },
+ "TRUE": {
+ "color": "green",
+ "index": 0
+ }
+ },
+ "type": "value"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "purple",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 24
+ },
+ {
+ "color": "#EAB839",
+ "value": 168
+ },
+ {
+ "color": "red",
+ "value": 720
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "deployment_finished_date"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.width",
+ "value": 174
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "incident_resolution_date"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "green",
+ "mode": "fixed"
+ }
+ },
+ {
+ "id": "custom.width",
+ "value": 208
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "failed_deployment_recovery_time"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "url"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": true,
+ "title": "",
+ "url": "${__data.fields[\"metric_hidden\"]}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric_hidden"
+ },
+ "properties": [
+ {
+ "id": "custom.hidden",
+ "value": true
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 19,
+ "w": 20,
+ "x": 4,
+ "y": 2
+ },
+ "id": 80,
+ "links": [],
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": [
+ "failed_deployment_recovery_time"
+ ],
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "frameIndex": 1,
+ "showHeader": true,
+ "sortBy": []
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "4. Deployments and Incidents Details",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 4,
+ "x": 0,
+ "y": 9
+ },
+ "id": 88,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "2. Incident Count",
+ "type": "gauge"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 6,
+ "w": 4,
+ "x": 0,
+ "y": 15
+ },
+ "id": 44,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "3. Deployment Count",
+ "type": "gauge"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "All",
+ "value": "$__all"
+ },
+ "datasource": "mysql",
+ "definition": "select distinct name from projects",
+ "hide": 0,
+ "includeAll": true,
+ "label": "Project",
+ "multi": true,
+ "name": "project",
+ "options": [],
+ "query": "select distinct name from projects",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6M",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "DORA Details - Failed Deployment Recovery Time",
+ "uid": "Failed-deployment-recovery-time",
+ "version": 12,
+ "weekStart": ""
+}
\ No newline at end of file
diff --git a/grafana/dashboards/DORADetails-LeadTimeforChanges.json b/grafana/dashboards/DORADetails-LeadTimeforChanges.json
new file mode 100644
index 000000000..b2d1d2251
--- /dev/null
+++ b/grafana/dashboards/DORADetails-LeadTimeforChanges.json
@@ -0,0 +1,1130 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "id": 43,
+ "links": [
+ {
+ "asDropdown": false,
+ "icon": "bolt",
+ "includeVars": false,
+ "keepTime": true,
+ "tags": [],
+ "targetBlank": false,
+ "title": "Go Back",
+ "tooltip": "",
+ "type": "link",
+ "url": "/d/qNo8_0M4z2/dora2?orgId=1"
+ }
+ ],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "gridPos": {
+ "h": 2,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 63,
+ "links": [],
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "This dashboard is designed to find the details about [Lead Time for Changes](https://devlake.apache.org/docs/Metrics/LeadTimeForChanges) in DORA.",
+ "mode": "markdown"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Dashboard Introduction",
+ "type": "text"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Lead time for changes = median(PR deployed date - PR's first commit's authored date)",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "green",
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": true,
+ "inspect": false
+ },
+ "mappings": [],
+ "noValue": "0",
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "purple",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 24
+ },
+ {
+ "color": "orange",
+ "value": 168
+ },
+ {
+ "color": "red",
+ "value": 720
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "change_lead_time"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR url"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": true,
+ "title": "",
+ "url": "${__data.fields[\"metric_hidden\"]}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric_hidden"
+ },
+ "properties": [
+ {
+ "id": "custom.hidden",
+ "value": true
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 15,
+ "w": 24,
+ "x": 0,
+ "y": 2
+ },
+ "id": 70,
+ "links": [],
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": true,
+ "enablePagination": false,
+ "fields": "",
+ "reducer": [
+ "count"
+ ],
+ "show": false
+ },
+ "showHeader": true,
+ "sortBy": [
+ {
+ "desc": true,
+ "displayName": "change_lead_time_in_hours"
+ }
+ ]
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _pr_stats as (\n-- get the cycle time of PRs deployed by the deployments finished each month\n\tSELECT\n\t\tdistinct\n\t\tpr.id,\n\t\tpr.title,\n\t\tpr.url,\n\t\tpr.created_date,\n\t\tppm.pr_coding_time,\n\t\tppm.pr_pickup_time,\n\t\tppm.pr_review_time,\n\t\tppm.pr_deploy_time,\n\t\tppm.first_commit_sha,\n\t\tprc.commit_authored_date,\n\t\tcdc.cicd_deployment_id,\n\t\tcdc.name, \n\t\tcdc.finished_date,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr\n\t\tjo [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "1. PR Details",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 8,
+ "x": 0,
+ "y": 17
+ },
+ "id": 75,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "PR Cycle Time",
+ "url": "https://devlake.apache.org/docs/Metrics/PRCycleTime"
+ }
+ ],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no cycle_time to make sure cycle_time equals the sum of the four metrics below\n\t\tcoalesce(prm.pr_cycle_time/60,0) as cycle_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pr.crea [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "2. Average PR Cycle Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 4,
+ "x": 8,
+ "y": 17
+ },
+ "id": 71,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "PR Coding Time",
+ "url": "https://devlake.apache.org/docs/Metrics/PRCodingTime"
+ }
+ ],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no coding_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_coding_time/60,0) as coding_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pr.cre [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "3. Average PR Coding Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Opened"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Merged"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 4,
+ "x": 12,
+ "y": 17
+ },
+ "id": 72,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "PR Pickup Time",
+ "url": "https://devlake.apache.org/docs/Metrics/PRPickupTime"
+ }
+ ],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no pickup_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_pickup_time/60,0) as pickup_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pr.cre [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "4. Average PR Pickup Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Opened"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Merged"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 4,
+ "x": 16,
+ "y": 17
+ },
+ "id": 73,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "PR Review Time",
+ "url": "https://devlake.apache.org/docs/Metrics/PRReviewTime"
+ }
+ ],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no review_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_review_time/60,0) as review_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pr.cre [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "5. Average PR Review Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Opened"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "PR: Merged"
+ },
+ "properties": [
+ {
+ "id": "color",
+ "value": {
+ "fixedColor": "super-light-green",
+ "mode": "fixed"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 4,
+ "x": 20,
+ "y": 17
+ },
+ "id": 74,
+ "links": [
+ {
+ "targetBlank": true,
+ "title": "PR Deploy Time",
+ "url": "https://devlake.apache.org/docs/Metrics/PRDeployTime"
+ }
+ ],
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "hide": false,
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "with _prs as(\n SELECT\n pr.id,\n pr.created_date as pr_issued_date,\n -- convert null to 0 if a PR has no deploy_time to make sure cycle_time equals the sum of the four sub-metrics\n\t\tcoalesce(prm.pr_deploy_time/60,0) as deploy_time\n FROM pull_requests pr\n left join project_pr_metrics prm on pr.id = prm.id\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.table = 'repos' \n WHERE\n $__timeFilter(pr.created_date)\n and pr.cre [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "ae_projects",
+ "timeColumn": "ae_create_time",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "6. Average PR Deploy Time",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [
+ {
+ "options": {
+ "pattern": ".*elite.*",
+ "result": {
+ "color": "purple",
+ "index": 0
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*high.*",
+ "result": {
+ "color": "green",
+ "index": 1
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*medium.*",
+ "result": {
+ "color": "yellow",
+ "index": 2
+ }
+ },
+ "type": "regex"
+ },
+ {
+ "options": {
+ "pattern": ".*low.*",
+ "result": {
+ "color": "red",
+ "index": 3
+ }
+ },
+ "type": "regex"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green"
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 7,
+ "w": 24,
+ "x": 0,
+ "y": 24
+ },
+ "id": 40,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "select \n count(distinct pr.id) as 'All PRs'\nfrom \n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\nwhere \n pm.project_name in ($project)\n ",
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ },
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "select \n count(distinct pr.id) as 'Merged PRs'\nfrom \n pull_requests pr\n join project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\nwhere \n pm.project_name in ($project)\n and pr.merged_date is not null\n ",
+ "refId": "B",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ },
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- Metric 2: median lead time for changes\nwith _pr_stats as (\n-- get the cycle time of PRs deployed by the deployments finished in the selected period\n\tSELECT\n\t\tdistinct pr.id,\n\t\tppm.pr_cycle_time\n\tFROM\n\t\tpull_requests pr \n\t\tjoin project_pr_metrics ppm on ppm.id = pr.id\n\t\tjoin project_mapping pm on pr.base_repo_id = pm.row_id and pm.`table` = 'repos'\n\t\tjoin cicd_deployment_commits cdc on ppm.deployment_commit_id = cdc.id\n\tWHERE\n\t pm.proje [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "7. Number of PRs in different statuses",
+ "type": "gauge"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "All",
+ "value": "$__all"
+ },
+ "datasource": "mysql",
+ "definition": "select distinct name from projects",
+ "hide": 0,
+ "includeAll": true,
+ "label": "Project",
+ "multi": true,
+ "name": "project",
+ "options": [],
+ "query": "select distinct name from projects",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "current": {
+ "selected": false,
+ "text": "2023",
+ "value": "2023"
+ },
+ "datasource": "mysql",
+ "definition": "select dora_report from dora_benchmarks",
+ "hide": 0,
+ "includeAll": false,
+ "label": "DORA Report",
+ "multi": false,
+ "name": "dora_report",
+ "options": [],
+ "query": "select dora_report from dora_benchmarks",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "current": {
+ "selected": false,
+ "text": "Failed Deployment Recovery Time",
+ "value": "Failed Deployment Recovery Time"
+ },
+ "datasource": "mysql",
+ "definition": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
+ "hide": 2,
+ "includeAll": false,
+ "label": "TitleValue",
+ "multi": false,
+ "name": "title_value",
+ "options": [],
+ "query": "SELECT \n CASE \n WHEN dora_report = '2023' THEN \"Failed Deployment Recovery Time\"\n WHEN dora_report = '2021' THEN \"Median Time to Restore Service\"\n ELSE NULL \n END AS title_value\nFROM dora_benchmarks\nWHERE dora_report = '${dora_report:raw}'",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6M",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "DORA Details - Lead Time for Changes",
+ "uid": "Lead-time-for-changes",
+ "version": 10,
+ "weekStart": ""
+}
\ No newline at end of file
diff --git a/grafana/dashboards/DORADetails-TimetoRestoreService.json b/grafana/dashboards/DORADetails-TimetoRestoreService.json
new file mode 100644
index 000000000..a8121fd15
--- /dev/null
+++ b/grafana/dashboards/DORADetails-TimetoRestoreService.json
@@ -0,0 +1,455 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 0,
+ "id": 44,
+ "links": [
+ {
+ "asDropdown": false,
+ "icon": "bolt",
+ "includeVars": false,
+ "keepTime": true,
+ "tags": [],
+ "targetBlank": false,
+ "title": "Go Back",
+ "tooltip": "",
+ "type": "link",
+ "url": "/d/qNo8_0M4z2/dora2?orgId=1"
+ }
+ ],
+ "liveNow": false,
+ "panels": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "gridPos": {
+ "h": 2,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 63,
+ "links": [],
+ "options": {
+ "code": {
+ "language": "plaintext",
+ "showLineNumbers": false,
+ "showMiniMap": false
+ },
+ "content": "This dashboard is designed to find the details about [Time to restore service\n](https://devlake.apache.org/docs/Metrics/MTTR) in DORA.",
+ "mode": "markdown"
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "queryType": "randomWalk",
+ "refId": "A"
+ }
+ ],
+ "title": "Dashboard Introduction",
+ "type": "text"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "h"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 9,
+ "w": 5,
+ "x": 0,
+ "y": 2
+ },
+ "id": 87,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "1. Median Time to Restore Service",
+ "type": "gauge"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "rgba(255, 255, 255, 1)",
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": true,
+ "inspect": false
+ },
+ "mappings": [
+ {
+ "options": {
+ "FALSE": {
+ "color": "red",
+ "index": 1
+ },
+ "TRUE": {
+ "color": "green",
+ "index": 0
+ }
+ },
+ "type": "value"
+ }
+ ],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "purple",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 24
+ },
+ {
+ "color": "yellow",
+ "value": 168
+ },
+ {
+ "color": "red",
+ "value": 720
+ }
+ ]
+ },
+ "unit": "m"
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "url"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": true,
+ "title": "",
+ "url": "${__data.fields[\"metric_hidden\"]}"
+ }
+ ]
+ },
+ {
+ "id": "custom.width",
+ "value": 432
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "metric_hidden"
+ },
+ "properties": [
+ {
+ "id": "custom.hidden",
+ "value": true
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "title"
+ },
+ "properties": [
+ {
+ "id": "custom.width",
+ "value": 431
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "change_lead_time"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "type": "color-text"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 19,
+ "w": 19,
+ "x": 5,
+ "y": 2
+ },
+ "id": 86,
+ "links": [],
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": [
+ "lead_time_minutes"
+ ],
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "frameIndex": 1,
+ "showHeader": true,
+ "sortBy": []
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "queryType": "randomWalk",
+ "rawQuery": true,
+ "rawSql": "-- ***** 2021 report ***** --\n-- Metric 4: Median time to restore service \nwith _incidents as (\n-- get the incidents created within the selected time period in the top-right corner\n\tSELECT\n\t distinct i.id as \"incident_id\",\n\t\ti.title,\n\t\ti.url,\n\t\ti.url as \"metric_hidden\",\n\t\t-- i.created_date,\n i.resolution_date,\n\t cast(lead_time_minutes/60 as signed) as change_lead_time\n\tFROM\n\t\tissues i\n\t join board_issues bi on i.id = bi.issue_i [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "id"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ },
+ "table": "_devlake_tasks",
+ "timeColumn": "created_at",
+ "timeColumnType": "timestamp",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "3. Time to restore service details",
+ "transparent": true,
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 10,
+ "w": 5,
+ "x": 0,
+ "y": 11
+ },
+ "id": 88,
+ "links": [],
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "/.*/",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "pluginVersion": "9.5.15",
+ "targets": [
+ {
+ "datasource": "mysql",
+ "editorMode": "code",
+ "format": "table",
+ "hide": false,
+ "rawQuery": true,
+ "rawSql": "-- ***** 2023 report ***** --\n-- Metric 4: Failed deployment recovery time\nwith _deployments as (\n SELECT\n cdc.cicd_deployment_id as deployment_id,\n max(cdc.finished_date) as deployment_finished_date\n FROM \n cicd_deployment_commits cdc\n JOIN project_mapping pm on cdc.cicd_scope_id = pm.row_id and pm.`table` = 'cicd_scopes'\n WHERE\n pm.project_name in ($project)\n and cdc.result = 'SUCCESS'\n and cdc [...]
+ "refId": "D",
+ "sql": {
+ "columns": [
+ {
+ "parameters": [],
+ "type": "function"
+ }
+ ],
+ "groupBy": [
+ {
+ "property": {
+ "type": "string"
+ },
+ "type": "groupBy"
+ }
+ ],
+ "limit": 50
+ }
+ }
+ ],
+ "title": "2. Incident Count",
+ "type": "gauge"
+ }
+ ],
+ "refresh": "",
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "All",
+ "value": "$__all"
+ },
+ "datasource": "mysql",
+ "definition": "select distinct name from projects",
+ "hide": 0,
+ "includeAll": true,
+ "label": "Project",
+ "multi": true,
+ "name": "project",
+ "options": [],
+ "query": "select distinct name from projects",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6M",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "DORA Details - Time to Restore Service",
+ "uid": "Time-to-restore-service",
+ "version": 13,
+ "weekStart": ""
+}
\ No newline at end of file