This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 41c047d2b feat: add q dev dashboard (#8461)
41c047d2b is described below
commit 41c047d2b54cefb9c4e86a19c2d738d0ab3ccbcf
Author: Warren Chen <[email protected]>
AuthorDate: Wed Jun 4 12:05:23 2025 +0800
feat: add q dev dashboard (#8461)
---
grafana/dashboards/QDevUserData.json | 690 ++++++++++++++++++++++++++++++
grafana/dashboards/QDevUserMetrics.json | 720 ++++++++++++++++++++++++++++++++
2 files changed, 1410 insertions(+)
diff --git a/grafana/dashboards/QDevUserData.json
b/grafana/dashboards/QDevUserData.json
new file mode 100644
index 000000000..fd37f1aa9
--- /dev/null
+++ b/grafana/dashboards/QDevUserData.json
@@ -0,0 +1,690 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": 100,
+ "links": [],
+ "panels": [
+ {
+ "datasource": "mysql",
+ "description": "Daily AI code interaction trends across all users",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "smooth",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 2,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "sum"],
+ "displayMode": "table",
+ "placement": "right"
+ },
+ "tooltip": {
+ "mode": "multi"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n date as time,\n
SUM(inline_chat_acceptance_event_count) as 'Accepted Suggestions',\n
SUM(inline_chat_dismissal_event_count) as 'Dismissed Suggestions',\n
SUM(inline_chat_rejection_event_count) as 'Rejected Suggestions',\n
SUM(inline_chat_total_event_count) as 'Total Suggestions'\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY
date",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Daily AI Suggestion Interactions",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Daily AI code line changes across all users",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "smooth",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 8
+ },
+ "id": 3,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "sum"],
+ "displayMode": "table",
+ "placement": "right"
+ },
+ "tooltip": {
+ "mode": "multi"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n date as time,\n
SUM(inline_chat_accepted_line_additions) as 'Accepted Line Additions',\n
SUM(inline_chat_accepted_line_deletions) as 'Accepted Line Deletions',\n
SUM(inline_chat_dismissed_line_additions) as 'Dismissed Line Additions',\n
SUM(inline_chat_dismissed_line_deletions) as 'Dismissed Line Deletions',\n
SUM(inline_chat_rejected_line_additions) as 'Rejected Line Additions',\n
SUM(inline_chat_rejected_line_deletions) as 'Rejected Line Deletions', [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Daily AI Code Line Changes",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Code review metrics over time",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "smooth",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 16
+ },
+ "id": 4,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "sum"],
+ "displayMode": "table",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "multi"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n date as time,\n
SUM(code_review_findings_count) as 'Code Review Findings',\n
SUM(code_review_succeeded_event_count) as 'Code Review Succeeded Events'\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY
date",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Code Review Metrics",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Daily acceptance rate of AI suggestions",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "smooth",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "percentunit"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 16
+ },
+ "id": 5,
+ "options": {
+ "legend": {
+ "calcs": ["mean", "max", "min"],
+ "displayMode": "table",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "multi"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n date as time,\n
SUM(inline_chat_acceptance_event_count) /
NULLIF(SUM(inline_chat_total_event_count), 0) as 'Acceptance Rate'\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY
date",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Daily AI Suggestion Acceptance Rate",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Top users by AI code interaction metrics",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "displayMode": "auto",
+ "filterable": true
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Acceptance Rate"
+ },
+ "properties": [
+ {
+ "id": "unit",
+ "value": "percentunit"
+ },
+ {
+ "id": "custom.displayMode",
+ "value": "gradient-gauge"
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 24
+ },
+ "id": 6,
+ "options": {
+ "showHeader": true,
+ "sortBy": [
+ {
+ "desc": true,
+ "displayName": "Total Events"
+ }
+ ]
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n user_id,\n SUM(inline_chat_total_event_count)
as 'Total Events',\n SUM(inline_chat_acceptance_event_count) as 'Accepted
Events',\n SUM(inline_chat_dismissal_event_count) as 'Dismissed Events',\n
SUM(inline_chat_rejection_event_count) as 'Rejected Events',\n
SUM(inline_ai_code_lines) as 'AI Code Lines',\n
SUM(inline_chat_acceptance_event_count) /
NULLIF(SUM(inline_chat_total_event_count), 0) as 'Acceptance Rate',\n
MIN(date) as 'First Activity',\n MA [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Top Users by AI Interaction (Top 20)",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Distribution of AI suggestion types across users",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ }
+ },
+ "mappings": []
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 32
+ },
+ "id": 7,
+ "options": {
+ "displayLabels": ["percent"],
+ "legend": {
+ "displayMode": "list",
+ "placement": "right",
+ "values": ["value"]
+ },
+ "pieType": "pie",
+ "reduceOptions": {
+ "calcs": ["sum"],
+ "fields": "",
+ "values": false
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n 'Accepted' as category,\n
SUM(inline_chat_acceptance_event_count) as value\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nUNION ALL\nSELECT\n
'Dismissed' as category,\n SUM(inline_chat_dismissal_event_count) as
value\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nUNION
ALL\nSELECT\n 'Rejected' as category,\n
SUM(inline_chat_rejection_event_count) as value\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "AI Suggestion Response Distribution",
+ "type": "piechart"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Weekly trends in AI code interactions",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "axisSoftMin": 0,
+ "fillOpacity": 80,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineWidth": 1
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 32
+ },
+ "id": 8,
+ "options": {
+ "barWidth": 0.6,
+ "groupWidth": 0.7,
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "right"
+ },
+ "orientation": "auto",
+ "showValue": "auto",
+ "text": {
+ "valueSize": 12
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n DATE_FORMAT(date, '%Y-%U') as time,\n
SUM(inline_chat_acceptance_event_count) as 'Accepted',\n
SUM(inline_chat_dismissal_event_count) as 'Dismissed',\n
SUM(inline_chat_rejection_event_count) as 'Rejected'\nFROM
lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY
DATE_FORMAT(date, '%Y-%U')\nORDER BY time",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Weekly AI Suggestion Responses",
+ "type": "barchart"
+ }
+ ],
+ "refresh": "5m",
+ "schemaVersion": 30,
+ "style": "dark",
+ "tags": ["q_dev", "user_data"],
+ "templating": {
+ "list": []
+ },
+ "time": {
+ "from": "now-30d",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "utc",
+ "title": "Q Dev User Data Dashboard",
+ "uid": "qdev_user_data",
+ "version": 1
+}
diff --git a/grafana/dashboards/QDevUserMetrics.json
b/grafana/dashboards/QDevUserMetrics.json
new file mode 100644
index 000000000..eb5a2ce2b
--- /dev/null
+++ b/grafana/dashboards/QDevUserMetrics.json
@@ -0,0 +1,720 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": "-- Grafana --",
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": 101,
+ "links": [],
+ "panels": [
+ {
+ "datasource": "mysql",
+ "description": "Overview of key user metrics",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 1,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "sum"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "text": {},
+ "textMode": "auto"
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n COUNT(DISTINCT user_id) as 'Total Users',\n
SUM(total_inline_chat_total_event_count) as 'Total AI Suggestions',\n
SUM(total_inline_chat_acceptance_event_count) as 'Total Accepted
Suggestions',\n SUM(total_inline_ai_code_lines) as 'Total AI Code Lines'\nFROM
lake._tool_q_dev_user_metrics",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Overall Usage Statistics",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Top users by total AI interactions",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "axisSoftMin": 0,
+ "fillOpacity": 80,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineWidth": 1
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 4
+ },
+ "id": 2,
+ "options": {
+ "barWidth": 0.6,
+ "groupWidth": 0.7,
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "orientation": "horizontal",
+ "showValue": "auto",
+ "text": {
+ "valueSize": 12
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n user_id,\n total_inline_chat_total_event_count
as 'Total Events'\nFROM lake._tool_q_dev_user_metrics\nORDER BY
total_inline_chat_total_event_count DESC\nLIMIT 10",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Top 10 Users by Total AI Interactions",
+ "type": "barchart"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Top users by acceptance rate",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "axisSoftMin": 0,
+ "fillOpacity": 80,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineWidth": 1
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "percentunit"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 4
+ },
+ "id": 3,
+ "options": {
+ "barWidth": 0.6,
+ "groupWidth": 0.7,
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "orientation": "horizontal",
+ "showValue": "auto",
+ "text": {
+ "valueSize": 12
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n user_id,\n acceptance_rate\nFROM
lake._tool_q_dev_user_metrics\nWHERE total_inline_chat_total_event_count >
10\nORDER BY acceptance_rate DESC\nLIMIT 10",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Top 10 Users by Acceptance Rate (min 10 events)",
+ "type": "barchart"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Detailed user metrics table",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "displayMode": "auto",
+ "filterable": true
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "acceptance_rate"
+ },
+ "properties": [
+ {
+ "id": "unit",
+ "value": "percentunit"
+ },
+ {
+ "id": "custom.displayMode",
+ "value": "gradient-gauge"
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "total_days"
+ },
+ "properties": [
+ {
+ "id": "unit",
+ "value": "d"
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 10,
+ "w": 24,
+ "x": 0,
+ "y": 12
+ },
+ "id": 4,
+ "options": {
+ "showHeader": true,
+ "sortBy": [
+ {
+ "desc": true,
+ "displayName": "Total Events"
+ }
+ ]
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n user_id,\n first_date,\n last_date,\n
total_days,\n total_inline_chat_total_event_count as 'Total Events',\n
total_inline_chat_acceptance_event_count as 'Accepted Events',\n
total_inline_chat_dismissal_event_count as 'Dismissed Events',\n
total_inline_chat_rejection_event_count as 'Rejected Events',\n
total_inline_ai_code_lines as 'AI Code Lines',\n acceptance_rate\nFROM
lake._tool_q_dev_user_metrics\nORDER BY total_inline_chat_total_event_count
DESC",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "User Metrics Overview",
+ "type": "table"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Average metrics per user",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 22
+ },
+ "id": 5,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "horizontal",
+ "reduceOptions": {
+ "calcs": [
+ "mean"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "text": {},
+ "textMode": "auto"
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n AVG(avg_inline_chat_total_event_count) as 'Avg
Daily Suggestions',\n AVG(avg_inline_chat_acceptance_event_count) as 'Avg
Daily Acceptances',\n AVG(avg_inline_ai_code_lines) as 'Avg Daily AI Code
Lines',\n AVG(acceptance_rate) as 'Avg Acceptance Rate'\nFROM
lake._tool_q_dev_user_metrics\nWHERE total_inline_chat_total_event_count > 5",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Average User Metrics (users with >5 events)",
+ "type": "stat"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Distribution of user acceptance rates",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "bars",
+ "fillOpacity": 80,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "never",
+ "spanNulls": true,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 30
+ },
+ "id": 6,
+ "options": {
+ "legend": {
+ "calcs": [],
+ "displayMode": "list",
+ "placement": "bottom"
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "time_series",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n 'Distribution' as time,\n CASE\n WHEN
acceptance_rate < 0.1 THEN '0-10%'\n WHEN acceptance_rate < 0.2 THEN
'10-20%'\n WHEN acceptance_rate < 0.3 THEN '20-30%'\n WHEN
acceptance_rate < 0.4 THEN '30-40%'\n WHEN acceptance_rate < 0.5 THEN
'40-50%'\n WHEN acceptance_rate < 0.6 THEN '50-60%'\n WHEN
acceptance_rate < 0.7 THEN '60-70%'\n WHEN acceptance_rate < 0.8 THEN
'70-80%'\n WHEN acceptance_rate < 0.9 THEN '80-90%'\n ELSE '90-10 [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "User Acceptance Rate Distribution",
+ "type": "timeseries"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Distribution of user activity levels",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ }
+ },
+ "mappings": []
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 30
+ },
+ "id": 7,
+ "options": {
+ "displayLabels": ["percent", "value"],
+ "legend": {
+ "displayMode": "list",
+ "placement": "right",
+ "values": ["value"]
+ },
+ "pieType": "pie",
+ "reduceOptions": {
+ "calcs": ["sum"],
+ "fields": "",
+ "values": false
+ },
+ "tooltip": {
+ "mode": "single"
+ }
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n CASE\n WHEN
total_inline_chat_total_event_count < 10 THEN 'Low (<10 events)'\n WHEN
total_inline_chat_total_event_count < 50 THEN 'Medium (10-50 events)'\n WHEN
total_inline_chat_total_event_count < 100 THEN 'High (50-100 events)'\n ELSE
'Very High (>100 events)'\n END as category,\n COUNT(*) as value\nFROM
lake._tool_q_dev_user_metrics\nGROUP BY category\nORDER BY FIELD(category, 'Low
(<10 events)', 'Medium (10-50 events)', 'High (50-100 even [...]
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "User Activity Level Distribution",
+ "type": "piechart"
+ },
+ {
+ "datasource": "mysql",
+ "description": "Code review metrics by user",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "displayMode": "auto",
+ "filterable": true
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 38
+ },
+ "id": 8,
+ "options": {
+ "showHeader": true,
+ "sortBy": [
+ {
+ "desc": true,
+ "displayName": "Total Findings"
+ }
+ ]
+ },
+ "pluginVersion": "8.0.6",
+ "targets": [
+ {
+ "format": "table",
+ "group": [],
+ "metricColumn": "none",
+ "rawQuery": true,
+ "rawSql": "SELECT\n user_id,\n total_code_review_findings_count as
'Total Findings',\n total_code_review_succeeded_event_count as 'Succeeded
Events',\n avg_code_review_findings_count as 'Avg Findings per Day',\n
avg_code_review_succeeded_event_count as 'Avg Succeeded Events per Day'\nFROM
lake._tool_q_dev_user_metrics\nWHERE total_code_review_findings_count >
0\nORDER BY total_code_review_findings_count DESC",
+ "refId": "A",
+ "select": [
+ [
+ {
+ "params": [
+ "value"
+ ],
+ "type": "column"
+ }
+ ]
+ ],
+ "timeColumn": "time",
+ "where": [
+ {
+ "name": "$__timeFilter",
+ "params": [],
+ "type": "macro"
+ }
+ ]
+ }
+ ],
+ "title": "Code Review Metrics by User",
+ "type": "table"
+ }
+ ],
+ "refresh": "5m",
+ "schemaVersion": 30,
+ "style": "dark",
+ "tags": ["q_dev", "user_metrics"],
+ "templating": {
+ "list": []
+ },
+ "time": {
+ "from": "now-30d",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "utc",
+ "title": "Q Dev User Metrics Dashboard",
+ "uid": "qdev_user_metrics",
+ "version": 1
+}