You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2026/08/28 09:44:11 UTC
(devlake) branch main updated: feat(grafana): add core Kiro dashboards (#9077)
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/devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 168ee34f9 feat(grafana): add core Kiro dashboards (#9077)
168ee34f9 is described below
commit 168ee34f9847f71bc108890c2cb4759b5a4bc32b
Author: Warren Chen <wa...@gmail.com>
AuthorDate: Fri Aug 28 17:44:04 2026 +0800
feat(grafana): add core Kiro dashboards (#9077)
* feat(kiro): add S3 collection and plugin APIs
Signed-off-by: warren <wa...@gmail.com>
* feat(config-ui): add Kiro connection support
Signed-off-by: warren <wa...@gmail.com>
* feat(grafana): add core Kiro dashboards
Signed-off-by: warren <wa...@gmail.com>
* fix(kiro): use portable timestamp precision
Signed-off-by: warren <wa...@gmail.com>
* fix(kiro): keep q_dev in table info checks
Signed-off-by: warren <wa...@gmail.com>
---------
Signed-off-by: warren <wa...@gmail.com>
---
grafana/dashboards/mysql/ai-model-roi.json | 25 +-
.../mysql/{q-dev-dora.json => kiro-dora.json} | 386 ++++++++++-----------
.../kiro_activity_detail.json} | 196 ++++++-----
.../{qdev_executive.json => kiro_executive.json} | 147 +++++---
...ture_metrics.json => kiro_feature_metrics.json} | 168 ++++++---
.../mysql/{qdev_logging.json => kiro_logging.json} | 201 +++++++----
...qdev_user_report.json => kiro_user_report.json} | 71 ++--
grafana/dashboards/postgresql/ai-model-roi.json | 25 +-
.../postgresql/{q-dev-dora.json => kiro-dora.json} | 330 +++++++-----------
.../kiro_activity_detail.json} | 196 ++++++-----
.../{qdev_executive.json => kiro_executive.json} | 149 +++++---
...ture_metrics.json => kiro_feature_metrics.json} | 170 ++++++---
.../{qdev_logging.json => kiro_logging.json} | 203 +++++++----
...qdev_user_report.json => kiro_user_report.json} | 71 ++--
14 files changed, 1348 insertions(+), 990 deletions(-)
diff --git a/grafana/dashboards/mysql/ai-model-roi.json b/grafana/dashboards/mysql/ai-model-roi.json
index 49980a1fa..275fcf894 100644
--- a/grafana/dashboards/mysql/ai-model-roi.json
+++ b/grafana/dashboards/mysql/ai-model-roi.json
@@ -26,7 +26,7 @@
"targetBlank": true,
"title": "Kiro Usage Dashboard",
"type": "link",
- "url": "/d/qdev_user_report"
+ "url": "/d/kiro_user_report"
}
],
"panels": [
@@ -87,7 +87,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(SUM(credits_used)) AS \"Total Credits\" FROM _tool_q_dev_user_report WHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(SUM(credits_used)) AS 'Total Credits'\nFROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
@@ -138,7 +138,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT pr.id), 0), 0), 1) AS \"Credits / PR\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM pull_requests WHERE NOT merged_date IS NULL AND $__timeFilter(merged_date)) AS pr WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(SUM(r.credits_used) / NULLIF(COUNT(DISTINCT pr.id), 0), 1) AS 'Credits / PR'\nFROM _tool_kiro_user_report r\nCROSS JOIN (\n SELECT DISTINCT id FROM pull_requests\n WHERE merged_date IS NOT NULL AND $__timeFilter(merged_date)\n) pr\nWHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -189,7 +189,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT cdc.cicd_deployment_id), 0), 0), 1) AS \"Credits / Deploy\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT cicd_deployment_id FROM cicd_deployment_commits WHERE result = 'SUCCESS' AND environment = 'PRODUCTION' AND $__timeFilter(finished_date)) AS cdc WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(SUM(r.credits_used) / NULLIF(COUNT(DISTINCT cdc.cicd_deployment_id), 0), 1) AS 'Credits / Deploy'\nFROM _tool_kiro_user_report r\nCROSS JOIN (\n SELECT DISTINCT cicd_deployment_id\n FROM cicd_deployment_commits\n WHERE result = 'SUCCESS' AND environment = 'PRODUCTION'\n AND $__timeFilter(finished_date)\n) cdc\nWHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -240,7 +240,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT i.id), 0), 0), 1) AS \"Credits / Issue\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM issues WHERE NOT resolution_date IS NULL AND type <> 'INCIDENT' AND $__timeFilter(resolution_date)) AS i WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(SUM(r.credits_used) / NULLIF(COUNT(DISTINCT i.id), 0), 1) AS 'Credits / Issue'\nFROM _tool_kiro_user_report r\nCROSS JOIN (\n SELECT DISTINCT id FROM issues\n WHERE resolution_date IS NOT NULL AND type != 'INCIDENT'\n AND $__timeFilter(resolution_date)\n) i\nWHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -316,7 +316,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _prs AS (SELECT CAST(merged_date AS DATE) - (EXTRACT(ISODOW FROM merged_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS prs FROM pull_requests WHERE NOT merged_date IS NULL AND $__tim [...]
+ "rawSql": "WITH _credits AS (\n SELECT DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) AS week_start,\n SUM(credits_used) AS credits\n FROM _tool_kiro_user_report WHERE $__timeFilter(date)\n GROUP BY DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY)\n),\n_prs AS (\n SELECT DATE_SUB(DATE(merged_date), INTERVAL WEEKDAY(DATE(merged_date)) DAY) AS week_start,\n COUNT(*) AS prs\n FROM pull_requests\n WHERE merged_date IS NOT NULL AND $__timeFilter(merged_date [...]
"refId": "A"
}
],
@@ -379,7 +379,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _deploys AS (SELECT CAST(finished_date AS DATE) - (EXTRACT(ISODOW FROM finished_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(DISTINCT cicd_deployment_id) AS deploys FROM cicd_deployment_ [...]
+ "rawSql": "WITH _credits AS (\n SELECT DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) AS week_start,\n SUM(credits_used) AS credits\n FROM _tool_kiro_user_report WHERE $__timeFilter(date)\n GROUP BY DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY)\n),\n_deploys AS (\n SELECT DATE_SUB(DATE(finished_date), INTERVAL WEEKDAY(DATE(finished_date)) DAY) AS week_start,\n COUNT(DISTINCT cicd_deployment_id) AS deploys\n FROM cicd_deployment_commits\n WHERE resul [...]
"refId": "A"
}
],
@@ -442,7 +442,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _issues AS (SELECT CAST(resolution_date AS DATE) - (EXTRACT(ISODOW FROM resolution_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS resolved FROM issues WHERE NOT resolution_date IS NU [...]
+ "rawSql": "WITH _credits AS (\n SELECT DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) AS week_start,\n SUM(credits_used) AS credits\n FROM _tool_kiro_user_report WHERE $__timeFilter(date)\n GROUP BY DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY)\n),\n_issues AS (\n SELECT DATE_SUB(DATE(resolution_date), INTERVAL WEEKDAY(DATE(resolution_date)) DAY) AS week_start,\n COUNT(*) AS resolved\n FROM issues\n WHERE resolution_date IS NOT NULL AND type != 'INC [...]
"refId": "A"
}
],
@@ -505,7 +505,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS time, SUM(credits_used) AS \"Credits\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' ORDER BY time NULLS FIRST",
+ "rawSql": "SELECT\n DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) AS time,\n SUM(credits_used) AS 'Credits',\n SUM(total_messages) AS 'Messages',\n SUM(chat_conversations) AS 'Conversations'\nFROM _tool_kiro_user_report\nWHERE $__timeFilter(date)\nGROUP BY DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY)\nORDER BY time",
"refId": "A"
}
],
@@ -517,7 +517,6 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
"kiro",
"cost",
"efficiency"
@@ -531,7 +530,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "AI Cost-Efficiency (PostgreSQL)",
- "uid": "ai_cost_efficiency-pg",
+ "title": "AI Model ROI",
+ "uid": "ai_model_roi",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/mysql/q-dev-dora.json b/grafana/dashboards/mysql/kiro-dora.json
similarity index 61%
rename from grafana/dashboards/mysql/q-dev-dora.json
rename to grafana/dashboards/mysql/kiro-dora.json
index b9fd48f3a..ce2a54b7f 100644
--- a/grafana/dashboards/mysql/q-dev-dora.json
+++ b/grafana/dashboards/mysql/kiro-dora.json
@@ -36,10 +36,10 @@
"keepTime": true,
"tags": [],
"targetBlank": true,
- "title": "Q Dev Dashboard",
+ "title": "Kiro Dashboard",
"tooltip": "",
"type": "link",
- "url": "/d/qdev_user_data/q-dev-user-data-dashboard"
+ "url": "/d/kiro_user_data/kiro-user-data-dashboard"
}
],
"panels": [
@@ -61,7 +61,7 @@
"showLineNumbers": false,
"showMiniMap": false
},
- "content": "## AI-Powered DORA Dashboard\nThis dashboard correlates **Q Dev (AI coding assistant)** usage metrics with **DORA** performance indicators to help understand the impact of AI-assisted development on engineering efficiency.\n\n- **Left side**: Q Dev AI usage metrics (code generation, acceptance rate)\n- **Right side**: DORA metrics (Lead Time, Deployment Frequency, Change Failure Rate)\n- **Correlation charts**: Show trends over time to identify potential relationships",
+ "content": "## Kiro + DORA Dashboard\nThis dashboard compares **Kiro usage** with **DORA** performance indicators at monthly aggregates.\n\n- **Kiro metrics**: active users, credits, messages, conversations, and credits per message\n- **DORA metrics**: lead time, deployment frequency, and change failure rate\n- **Semantic boundary**: Kiro does not export accepted LOC, suggestion acceptance, generated tests, or code-review findings; no proxy is presented as an equivalent measure",
"mode": "markdown"
},
"pluginVersion": "13.0.2",
@@ -82,8 +82,11 @@
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Number of unique users who used Q Dev AI features",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Unique Kiro users in the selected period, from the daily usage report.",
"fieldConfig": {
"defaults": {
"color": {
@@ -115,7 +118,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -126,20 +131,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) as 'Active Q Dev Users'\nFROM _tool_q_dev_user_data\nWHERE $__timeFilter(date)",
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS 'Active Kiro Users' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Q Dev Active Users",
+ "title": "Kiro Active Users",
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Total AI-generated code lines accepted (Inline + Chat)",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro exports credits, not accepted lines of code. Accepted LOC has no equivalent field.",
"fieldConfig": {
"defaults": {
"color": {
@@ -172,7 +183,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -183,20 +196,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT SUM(inline_ai_code_lines + chat_ai_code_lines) as 'AI Accepted Lines'\nFROM _tool_q_dev_user_data\nWHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(SUM(credits_used), 1) AS 'Kiro Credits Used' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Total AI Code Lines",
+ "title": "Total Kiro Credits",
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Acceptance rate of inline AI suggestions",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro does not export suggestion acceptance. Credits per message is a usage-efficiency ratio, not an acceptance rate.",
"fieldConfig": {
"defaults": {
"color": {
@@ -220,7 +239,7 @@
}
]
},
- "unit": "percentunit"
+ "unit": "none"
},
"overrides": []
},
@@ -237,7 +256,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -248,19 +269,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT \n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) as 'Acceptance Rate'\nFROM _tool_q_dev_user_data\nWHERE $__timeFilter(date)",
+ "rawSql": "SELECT SUM(credits_used) / NULLIF(SUM(total_messages), 0) AS 'Credits per Message' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "AI Acceptance Rate",
+ "title": "Credits per Message",
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Number of production deployments in selected period",
"fieldConfig": {
"defaults": {
@@ -293,7 +320,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -304,7 +333,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -316,7 +348,10 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Median lead time for changes in hours",
"fieldConfig": {
"defaults": {
@@ -358,7 +393,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -369,7 +406,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -381,7 +421,10 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Percentage of deployments that caused incidents",
"fieldConfig": {
"defaults": {
@@ -423,7 +466,9 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": ["lastNotNull"],
+ "calcs": [
+ "lastNotNull"
+ ],
"fields": "",
"values": false
},
@@ -434,7 +479,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -455,12 +503,15 @@
},
"id": 9,
"panels": [],
- "title": "AI Usage vs DORA Metrics Correlation",
+ "title": "Kiro Usage vs DORA Metrics",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Compare AI code generation trends with Lead Time for Changes. A negative correlation (AI lines up, Lead Time down) suggests AI is helping accelerate delivery.",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro credits are compared with Lead Time. Kiro does not export accepted code lines.",
"fieldConfig": {
"defaults": {
"color": {
@@ -514,7 +565,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Accepted Lines"
+ "options": "Kiro Credits"
},
"properties": [
{
@@ -533,29 +584,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Median Lead Time (hours)"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Lead Time (hours)"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "orange",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -568,7 +596,10 @@
"id": 10,
"options": {
"legend": {
- "calcs": ["mean", "max"],
+ "calcs": [
+ "mean",
+ "max"
+ ],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
@@ -582,20 +613,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_monthly AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(inline_ai_code_lines + chat_ai_code_lines) AS ai_lines\n FROM _tool_q_dev_user_data\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\nlead_time_monthly AS (\n SELECT\n DATE_FORMAT(cdc.finished_date, '%Y-%m-01') AS month,\n AVG(ppm.pr_cycle_time) / 60 AS avg_lead_time\n FROM pull_requests pr\n JOIN project_pr_metrics ppm ON ppm.id = pr.id\n JOIN p [...]
+ "rawSql": "WITH ai_monthly AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(credits_used) AS kiro_credits\n FROM _tool_kiro_user_report\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\nlead_time_monthly AS (\n SELECT\n DATE_FORMAT(cdc.finished_date, '%Y-%m-01') AS month,\n AVG(ppm.pr_cycle_time) / 60 AS avg_lead_time\n FROM pull_requests pr\n JOIN project_pr_metrics ppm ON ppm.id = pr.id\n JOIN project_mapping pm ON pr. [...]
"refId": "A"
}
],
- "title": "AI Code Generation vs Lead Time Trend",
+ "title": "Kiro Credits vs Lead Time Trend",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Compare AI suggestion acceptance rate with deployment frequency. Higher acceptance rate may indicate better AI integration and potentially more deployments.",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Usage-efficiency ratio versus deployment frequency. This is not suggestion acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -649,7 +686,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Acceptance Rate"
+ "options": "Credits per Message"
},
"properties": [
{
@@ -658,7 +695,7 @@
},
{
"id": "custom.axisLabel",
- "value": "Acceptance Rate"
+ "value": "Credits per Message"
},
{
"id": "unit",
@@ -672,29 +709,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Deployment Count"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Deployments"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "purple",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -707,7 +721,10 @@
"id": 11,
"options": {
"legend": {
- "calcs": ["mean", "max"],
+ "calcs": [
+ "mean",
+ "max"
+ ],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
@@ -721,20 +738,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_acceptance AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) AS acceptance_rate\n FROM _tool_q_dev_user_data\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\ndeployment_count AS (\n SELECT \n DATE_FORMAT(MAX(cdc.finished_date), '%Y-%m-01') AS month,\n COUNT(DISTINCT cdc.cicd_deployment_id) AS deploy_count\n FROM cicd_deployment_commits c [...]
+ "rawSql": "WITH ai_acceptance AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(credits_used) / NULLIF(SUM(total_messages), 0) AS credits_per_message\n FROM _tool_kiro_user_report\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\ndeployment_count AS (\n SELECT \n DATE_FORMAT(MAX(cdc.finished_date), '%Y-%m-01') AS month,\n COUNT(DISTINCT cdc.cicd_deployment_id) AS deploy_count\n FROM cicd_deployment_commits cdc\n JOIN proje [...]
"refId": "A"
}
],
- "title": "AI Acceptance Rate vs Deployment Frequency",
+ "title": "Credits per Message vs Deployment Frequency",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Compare AI-generated tests with Change Failure Rate. More AI-generated tests might correlate with lower failure rates.",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro does not export generated-test counts; total messages is the available activity-volume measure.",
"fieldConfig": {
"defaults": {
"color": {
@@ -788,7 +811,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Generated Tests"
+ "options": "Kiro Messages"
},
"properties": [
{
@@ -807,33 +830,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Change Failure Rate"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Failure Rate"
- },
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "red",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -846,7 +842,10 @@
"id": 12,
"options": {
"legend": {
- "calcs": ["mean", "max"],
+ "calcs": [
+ "mean",
+ "max"
+ ],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
@@ -860,20 +859,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_tests AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(test_generation_generated_tests) AS generated_tests\n FROM _tool_q_dev_user_data\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\ncfr_monthly AS (\n SELECT\n DATE_FORMAT(deployment_finished_date, '%Y-%m-01') AS month,\n SUM(has_incident) / NULLIF(COUNT(deployment_id), 0) AS cfr\n FROM (\n SELECT\n d.deployment_id,\n d.deployment_finishe [...]
+ "rawSql": "WITH ai_tests AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m-01') AS month,\n SUM(total_messages) AS kiro_messages\n FROM _tool_kiro_user_report\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m-01')\n),\ncfr_monthly AS (\n SELECT\n DATE_FORMAT(deployment_finished_date, '%Y-%m-01') AS month,\n SUM(has_incident) / NULLIF(COUNT(deployment_id), 0) AS cfr\n FROM (\n SELECT\n d.deployment_id,\n d.deployment_finished_date,\n COU [...]
"refId": "A"
}
],
- "title": "AI Test Generation vs Change Failure Rate",
+ "title": "Kiro Messages vs Change Failure Rate",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Compare active Q Dev users with Code Review findings. More AI-assisted code review might catch issues earlier.",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro does not export code-review findings. Shows active users and credits by month.",
"fieldConfig": {
"defaults": {
"color": {
@@ -927,30 +932,7 @@
{
"matcher": {
"id": "byName",
- "options": "Active Users"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "left"
- },
- {
- "id": "custom.axisLabel",
- "value": "Users"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "blue",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Code Review Findings"
+ "options": "Kiro Credits"
},
"properties": [
{
@@ -981,7 +963,10 @@
"id": 13,
"options": {
"legend": {
- "calcs": ["mean", "max"],
+ "calcs": [
+ "mean",
+ "max"
+ ],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
@@ -995,15 +980,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT \n STR_TO_DATE(DATE_FORMAT(date, '%Y-%m-01'), '%Y-%m-%d') AS time,\n COUNT(DISTINCT user_id) AS 'Active Users',\n SUM(code_review_findings_count) AS 'Code Review Findings'\nFROM _tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY DATE_FORMAT(date, '%Y-%m-01')\nORDER BY time",
+ "rawSql": "SELECT STR_TO_DATE(month_start, '%Y-%m-%d') AS time, active_users AS 'Active Users', kiro_credits AS 'Kiro Credits' FROM (SELECT DATE_FORMAT(date, '%Y-%m-01') AS month_start, COUNT(DISTINCT user_id) AS active_users, SUM(credits_used) AS kiro_credits FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY DATE_FORMAT(date, '%Y-%m-01')) monthly ORDER BY time",
"refId": "A"
}
],
- "title": "Q Dev Users vs Code Review Findings",
+ "title": "Kiro Users vs Credits",
"type": "timeseries"
},
{
@@ -1020,8 +1008,11 @@
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Monthly summary comparing Q Dev AI metrics with DORA metrics side by side",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Monthly Kiro usage metrics beside DORA metrics. LOC, acceptance, generated tests, and review findings are not exported by Kiro.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1050,7 +1041,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Acceptance Rate"
+ "options": "Credits per Message"
},
"properties": [
{
@@ -1075,47 +1066,6 @@
"value": 1
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Change Failure Rate"
- },
- "properties": [
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "custom.cellOptions",
- "value": {
- "mode": "gradient",
- "type": "gauge"
- }
- },
- {
- "id": "color",
- "value": {
- "mode": "continuous-RdYlGr"
- }
- },
- {
- "id": "max",
- "value": 0.3
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Lead Time (hours)"
- },
- "properties": [
- {
- "id": "unit",
- "value": "h"
- }
- ]
}
]
},
@@ -1131,7 +1081,9 @@
"footer": {
"countRows": false,
"fields": "",
- "reducer": ["sum"],
+ "reducer": [
+ "sum"
+ ],
"show": false
},
"showHeader": true,
@@ -1145,15 +1097,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_metrics AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m') AS month,\n COUNT(DISTINCT user_id) AS active_users,\n SUM(inline_ai_code_lines + chat_ai_code_lines) AS ai_lines,\n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) AS acceptance_rate,\n SUM(test_generation_generated_tests) AS generated_tests,\n SUM(code_review_findings_count) AS review_findings\n FROM _tool_q_dev_user_data\n WHERE $__timeFilter(date)\n GROUP BY [...]
+ "rawSql": "WITH ai_metrics AS (\n SELECT \n DATE_FORMAT(date, '%Y-%m') AS month,\n COUNT(DISTINCT user_id) AS active_users,\n SUM(credits_used) AS credits,\n SUM(credits_used) / NULLIF(SUM(total_messages), 0) AS credits_per_message,\n SUM(total_messages) AS messages,\n SUM(chat_conversations) AS conversations\n FROM _tool_kiro_user_report\n WHERE $__timeFilter(date)\n GROUP BY DATE_FORMAT(date, '%Y-%m')\n),\ndora_metrics AS (\n SELECT\n DATE_FORMAT(cdc [...]
"refId": "A"
}
],
- "title": "Monthly Q Dev vs DORA Metrics Comparison",
+ "title": "Monthly Kiro + DORA Metrics",
"type": "table"
}
],
@@ -1161,7 +1116,7 @@
"refresh": "5m",
"schemaVersion": 39,
"tags": [
- "q_dev",
+ "kiro",
"DORA",
"AI",
"correlation"
@@ -1171,10 +1126,17 @@
{
"current": {
"selected": true,
- "text": ["All"],
- "value": ["$__all"]
+ "text": [
+ "All"
+ ],
+ "value": [
+ "$__all"
+ ]
+ },
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
},
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
"definition": "SELECT DISTINCT name FROM projects",
"hide": 0,
"includeAll": true,
@@ -1197,7 +1159,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Q Dev + DORA Correlation",
- "uid": "qdev_dora_correlation",
+ "title": "Kiro + DORA Correlation",
+ "uid": "kiro_dora_correlation",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/qdev_user_data.json b/grafana/dashboards/mysql/kiro_activity_detail.json
similarity index 69%
rename from grafana/dashboards/postgresql/qdev_user_data.json
rename to grafana/dashboards/mysql/kiro_activity_detail.json
index d446fca81..ed5c615c4 100644
--- a/grafana/dashboards/postgresql/qdev_user_data.json
+++ b/grafana/dashboards/mysql/kiro_activity_detail.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Overview of key user metrics",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Usage-report totals. Accepted LOC and acceptance rates are not exported by Kiro.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,13 +69,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Users\", SUM(chat_ai_code_lines) AS \"Accepted Lines (Chat)\", SUM(inline_ai_code_lines) AS \"Accepted Lines (Inline Suggestion)\", CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS \"Acceptance Rate (Inline Suggestion)\", SUM(code_review_findings_count) AS \"Findings (Code Review)\", SUM(code_fix_accepted_lines) AS \"Accepted Lines (Code Fix)\", CAST(SUM(code_fix_acceptan [...]
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS 'Active Users', ROUND(SUM(credits_used), 1) AS 'Credits Used', SUM(total_messages) AS 'Messages', SUM(chat_conversations) AS 'Conversations' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A",
"select": [
[
@@ -115,8 +121,11 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily AI code line changes across all users",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Daily Kiro usage volume from the user report.",
"fieldConfig": {
"defaults": {
"color": {
@@ -195,13 +204,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(chat_ai_code_lines) AS \"Chat Accepted Lines\", SUM(code_fix_accepted_lines) AS \"Code Fix Accepted Lines\", SUM(code_fix_generated_lines) AS \"Code Fix Generated Lines\", SUM(transformation_lines_ingested) AS \"Java Transform Ingested Lines\", SUM(transformation_lines_generated) AS \"Java Transform Generated Lines\", SUM(inline_ai_code_lines) AS \"Inline Suggestion Accepted Lines\", SUM(inline_chat_accepted_line_additions) AS \"Inline Chat A [...]
+ "rawSql": "SELECT DATE(date) AS time, ROUND(SUM(credits_used), 1) AS 'Credits Used', SUM(total_messages) AS 'Messages', SUM(chat_conversations) AS 'Conversations' FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY DATE(date) ORDER BY time",
"refId": "A",
"select": [
[
@@ -240,12 +252,15 @@
]
}
],
- "title": "Daily AI Code Line Changes",
+ "title": "Daily Credits, Messages & Conversations",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily AI interaction trends across all users",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Chat events split into user turns and agent continuations.",
"fieldConfig": {
"defaults": {
"color": {
@@ -324,13 +339,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(chat_messages_sent) AS \"Chat Messages Sent\", SUM(code_fix_acceptance_event_count) AS \"Code Fix Accepted Event Count\", SUM(code_fix_generation_event_count) AS \"Code Fix Generated Event Count\", SUM(transformation_event_count) AS \"Java Transform Event Count\", SUM(inline_acceptance_count) AS \"Inline Suggestion Accepted Suggestions\", SUM(inline_suggestions_count) AS \"Inline Suggestion Count\", SUM(inline_chat_total_event_count) AS \"Inl [...]
+ "rawSql": "SELECT DATE(timestamp) AS time, COUNT(*) AS 'Chat Events', SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS 'User Turns', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS 'Agent Continuations' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A",
"select": [
[
@@ -369,12 +387,15 @@
]
}
],
- "title": "Daily AI Interactions",
+ "title": "Daily Chat Activity",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Code review metrics over time",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Authoritative per-model and routing-mode message counts.",
"fieldConfig": {
"defaults": {
"color": {
@@ -453,12 +474,15 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(code_fix_acceptance_event_count) AS \"Code Fix Accepted Event Count\", SUM(code_fix_generation_event_count) AS \"Code Fix Generated Event Count\", SUM(code_review_findings_count) AS \"Total Findings\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT DATE(date) AS time, model_name AS metric, SUM(message_count) AS value FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY DATE(date), model_name ORDER BY time",
"refId": "A",
"select": [
[
@@ -497,12 +521,15 @@
]
}
],
- "title": "Code Review Metrics",
+ "title": "Daily Model / Route Messages",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily acceptance rate of AI suggestions",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Agent continuations divided by all chat events. This is not suggestion acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -581,13 +608,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, CAST(SUM(code_fix_acceptance_event_count) AS NUMERIC) / NULLIF(NULLIF(SUM(code_fix_generation_event_count), 0), 0) AS \"Code Fix\", CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS \"Inline Suggestions\", CAST(SUM(inline_chat_acceptance_event_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_chat_total_event_count), 0), 0) AS \"Inline Chat\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date [...]
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0) AS 'Agent Continuation Rate' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A",
"select": [
[
@@ -626,12 +656,15 @@
]
}
],
- "title": "Daily AI Suggestion Acceptance Rate",
+ "title": "Daily Agent Continuation Rate",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "User AI interaction metrics",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Per-user credits, messages, conversations, overage, and last activity.",
"fieldConfig": {
"defaults": {
"color": {
@@ -655,51 +688,7 @@
]
}
},
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Acceptance Rate"
- },
- "properties": [
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "custom.cellOptions",
- "value": {
- "mode": "gradient",
- "type": "gauge"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Inline Chat Accepted Events"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 239
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Acceptance Rate (Inline Suggestion)"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 172
- }
- ]
- }
- ]
+ "overrides": []
},
"gridPos": {
"h": 8,
@@ -724,13 +713,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", SUM(chat_ai_code_lines) AS \"Accepted Lines (Chat)\", SUM(transformation_lines_ingested) AS \"Lines Ingested (Java Transform)\", SUM(transformation_lines_generated) AS \"Lines Generated (Java Transform)\", SUM(transformation_event_count) AS \"Event Count (Java Transform)\", SUM(code_review_findings_count) AS \"Findings (Code Review)\", SUM(code_fix_accepted_lines) AS \"Accepted Lines (Code Fix)\", SUM(code_fix_ [...]
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS 'User', MAX(subscription_tier) AS 'Tier', ROUND(SUM(credits_used), 1) AS 'Credits Used', SUM(total_messages) AS 'Messages', SUM(chat_conversations) AS 'Conversations', SUM(overage_credits_used) AS 'Overage Credits', MAX(date) AS 'Last Activity' FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY user_id ORDER BY SUM(credits_used) DESC",
"refId": "A",
"select": [
[
@@ -769,12 +761,15 @@
]
}
],
- "title": "User Interactions",
+ "title": "Per-User Usage",
"type": "table"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily doc generation events and accepted/rejected lines",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Messages by Kiro client type. Doc-generation metrics are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -853,13 +848,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(doc_generation_event_count) AS \"Doc Generation Events\", SUM(doc_generation_accepted_line_additions) AS \"Accepted Line Additions\", SUM(doc_generation_accepted_line_updates) AS \"Accepted Line Updates\", SUM(doc_generation_rejected_line_additions) AS \"Rejected Line Additions\", SUM(doc_generation_rejected_line_updates) AS \"Rejected Line Updates\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NUL [...]
+ "rawSql": "SELECT DATE(date) AS time, client_type AS metric, SUM(total_messages) AS value FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY DATE(date), client_type ORDER BY time",
"refId": "A",
"select": [
[
@@ -898,12 +896,15 @@
]
}
],
- "title": "Doc Generation Metrics",
+ "title": "Daily Client Type Messages",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily test generation events and lines",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Completion requests, requests with returned suggestions, and returned lines. These are not acceptance events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -982,13 +983,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(test_generation_event_count) AS \"Test Generation Events\", SUM(test_generation_accepted_tests) AS \"Accepted Tests\", SUM(test_generation_generated_tests) AS \"Generated Tests\", SUM(test_generation_accepted_lines) AS \"Accepted Lines\", SUM(test_generation_generated_lines) AS \"Generated Lines\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT DATE(timestamp) AS time, COUNT(*) AS 'Completion Requests', SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) AS 'Requests with Results', SUM(returned_line_count) AS 'Returned Lines' FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A",
"select": [
[
@@ -1027,12 +1031,15 @@
]
}
],
- "title": "Test Generation Metrics",
+ "title": "Daily Completion Activity",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily agentic dev events and lines",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Steering, spec-mode, and agent-continuation events. Kiro does not export accepted agentic LOC.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1111,13 +1118,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(dev_generation_event_count) AS \"Dev Generation Events\", SUM(dev_acceptance_event_count) AS \"Dev Acceptance Events\", SUM(dev_generated_lines) AS \"Dev Generated Lines\", SUM(dev_accepted_lines) AS \"Dev Accepted Lines\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) AS 'Steering', SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) AS 'Spec Mode', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS 'Agent Continuations' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A",
"select": [
[
@@ -1156,7 +1166,7 @@
]
}
],
- "title": "Dev (Agentic) Metrics",
+ "title": "Daily Agentic Signals",
"type": "timeseries"
}
],
@@ -1164,7 +1174,7 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
+ "kiro",
"user_data"
],
"templating": {
@@ -1176,7 +1186,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Kiro Code Metrics Dashboard",
- "uid": "qdev_user_data-pg",
+ "title": "Kiro Activity Detail Dashboard",
+ "uid": "kiro_user_data",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/mysql/qdev_executive.json b/grafana/dashboards/mysql/kiro_executive.json
similarity index 74%
rename from grafana/dashboards/mysql/qdev_executive.json
rename to grafana/dashboards/mysql/kiro_executive.json
index fffbc99ba..32b2c45a3 100644
--- a/grafana/dashboards/mysql/qdev_executive.json
+++ b/grafana/dashboards/mysql/kiro_executive.json
@@ -27,7 +27,7 @@
"title": "Usage (New)",
"tooltip": "Kiro Usage Dashboard - Credits & Messages (new format)",
"type": "link",
- "url": "/d/qdev_user_report"
+ "url": "/d/kiro_user_report"
},
{
"asDropdown": false,
@@ -36,10 +36,10 @@
"keepTime": true,
"tags": [],
"targetBlank": true,
- "title": "Feature Metrics (Legacy)",
- "tooltip": "Kiro Legacy Feature Metrics (old format)",
+ "title": "Feature Metrics",
+ "tooltip": "Kiro Feature Metrics",
"type": "link",
- "url": "/d/qdev_feature_metrics"
+ "url": "/d/kiro_feature_metrics"
},
{
"asDropdown": false,
@@ -51,7 +51,7 @@
"title": "Prompt Logging",
"tooltip": "Kiro AI Activity Insights - Prompt Logging",
"type": "link",
- "url": "/d/qdev_logging"
+ "url": "/d/kiro_logging"
}
],
"panels": [
@@ -69,7 +69,10 @@
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Distinct users with chat activity in the last 7 days (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -116,11 +119,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) as 'WAU'\nFROM lake._tool_q_dev_chat_log\nWHERE timestamp >= DATE_SUB(NOW(), INTERVAL 7 DAY)",
+ "rawSql": "SELECT COUNT(DISTINCT user_id) as 'WAU'\nFROM lake._tool_kiro_chat_log\nWHERE timestamp >= DATE_SUB(NOW(), INTERVAL 7 DAY)",
"refId": "A"
}
],
@@ -128,8 +134,11 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Average credits spent per accepted line of code (new report + legacy metrics)",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Usage efficiency from Kiro reports. Accepted LOC is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -175,20 +184,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(SUM(r.credits_used) / NULLIF(SUM(d.total_accepted), 0), 2) as 'Credits per Accepted Line'\nFROM (\n SELECT user_id, date, SUM(credits_used) as credits_used\n FROM lake._tool_q_dev_user_report\n WHERE $__timeFilter(date)\n GROUP BY user_id, date\n) r\nJOIN (\n SELECT user_id, date,\n (inline_ai_code_lines + chat_ai_code_lines + code_fix_accepted_lines + dev_accepted_lines) as total_accepted\n FROM lake._tool_q_dev_user_data\n WHERE $__timeFilter [...]
+ "rawSql": "SELECT ROUND(SUM(credits_used) / NULLIF(SUM(total_messages), 0), 2) AS 'Credits per Message' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Credits Efficiency (new + legacy)",
+ "title": "Credits per Message",
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Percentage of inline suggestions accepted (from legacy feature metrics)",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Share of chat events generated by agent self-continuation. Suggestion acceptance is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -234,19 +249,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) * 100, 1) as 'Acceptance %'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0), 1) AS 'Agent Continuation %' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
- "title": "Inline Acceptance Rate (legacy)",
+ "title": "Agent Continuation Rate",
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Percentage of users who used steering rules (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -294,11 +315,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(COUNT(DISTINCT CASE WHEN has_steering = 1 THEN user_id END) / NULLIF(COUNT(DISTINCT user_id), 0) * 100, 0) as 'Steering %'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT ROUND(COUNT(DISTINCT CASE WHEN has_steering = 1 THEN user_id END) / NULLIF(COUNT(DISTINCT user_id), 0) * 100, 0) as 'Steering %'\nFROM lake._tool_kiro_chat_log\nWHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
@@ -315,11 +339,14 @@
},
"id": 101,
"panels": [],
- "title": "User Engagement (logging data: _tool_q_dev_chat_log)",
+ "title": "User Engagement",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Weekly active user count over time (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -399,11 +426,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n STR_TO_DATE(CONCAT(yw, ' Monday'), '%X%V %W') as time,\n COUNT(DISTINCT user_id) as 'Active Users'\nFROM (\n SELECT user_id, YEARWEEK(timestamp, 1) as yw\n FROM lake._tool_q_dev_chat_log\n WHERE $__timeFilter(timestamp)\n) t\nGROUP BY yw\nORDER BY time",
+ "rawSql": "SELECT\n STR_TO_DATE(CONCAT(yw, ' Monday'), '%X%V %W') as time,\n COUNT(DISTINCT user_id) as 'Active Users'\nFROM (\n SELECT user_id, YEARWEEK(timestamp, 1) as yw\n FROM lake._tool_kiro_chat_log\n WHERE $__timeFilter(timestamp)\n) t\nGROUP BY yw\nORDER BY time",
"refId": "A"
}
],
@@ -411,8 +441,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "New vs returning users by week (from prompt logging)",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "New users use the native is_new_user flag; early rows without that field are reported as existing/unknown.",
"fieldConfig": {
"defaults": {
"color": {
@@ -491,15 +524,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n STR_TO_DATE(CONCAT(yw, ' Monday'), '%X%V %W') as time,\n SUM(CASE WHEN yw = first_yw THEN 1 ELSE 0 END) as 'New Users',\n SUM(CASE WHEN yw != first_yw THEN 1 ELSE 0 END) as 'Returning Users'\nFROM (\n SELECT DISTINCT u.user_id, YEARWEEK(u.timestamp, 1) as yw, f.first_yw\n FROM lake._tool_q_dev_chat_log u\n JOIN (SELECT user_id, YEARWEEK(MIN(timestamp), 1) as first_yw FROM lake._tool_q_dev_chat_log GROUP BY user_id) f\n ON u.user_id = f.user_id\n WH [...]
+ "rawSql": "SELECT DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) AS time, COUNT(DISTINCT CASE WHEN is_new_user = 1 THEN user_id END) AS 'New Users', COUNT(DISTINCT CASE WHEN is_new_user = 0 OR is_new_user IS NULL THEN user_id END) AS 'Existing/Unknown Users' FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY DATE_SUB(DATE(date), INTERVAL WEEKDAY(DATE(date)) DAY) ORDER BY time",
"refId": "A"
}
],
- "title": "New vs Returning Users (Weekly)",
+ "title": "New vs Existing/Unknown Users (Weekly)",
"type": "timeseries"
},
{
@@ -512,11 +548,14 @@
},
"id": 102,
"panels": [],
- "title": "Credits & Subscription (new format: _tool_q_dev_user_report)",
+ "title": "Credits & Subscription",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Cumulative credits this month vs projected total (from new user_report)",
"fieldConfig": {
"defaults": {
@@ -596,11 +635,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(SUM(credits_used)) OVER (ORDER BY date) as 'Cumulative Credits',\n (SELECT SUM(credits_used) / COUNT(DISTINCT date) * DAY(LAST_DAY(CURDATE()))\n FROM lake._tool_q_dev_user_report\n WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())) as 'Projected Monthly'\nFROM lake._tool_q_dev_user_report\nWHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT\n date as time,\n SUM(SUM(credits_used)) OVER (ORDER BY date) as 'Cumulative Credits',\n (SELECT SUM(credits_used) / COUNT(DISTINCT date) * DAY(LAST_DAY(CURDATE()))\n FROM lake._tool_kiro_user_report\n WHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())) as 'Projected Monthly'\nFROM lake._tool_kiro_user_report\nWHERE YEAR(date) = YEAR(CURDATE()) AND MONTH(date) = MONTH(CURDATE())\nGROUP BY date\nORDER BY date",
"refId": "A"
}
],
@@ -608,7 +650,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Power tier users with no activity in the last 14 days (from new user_report)",
"fieldConfig": {
"defaults": {
@@ -658,11 +703,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n MAX(subscription_tier) as 'Tier',\n ROUND(SUM(credits_used), 1) as 'Total Credits Used',\n MAX(date) as 'Last Activity'\nFROM lake._tool_q_dev_user_report\nWHERE $__timeFilter(date)\n AND subscription_tier = 'POWER'\nGROUP BY user_id\nHAVING MAX(date) < DATE_SUB(NOW(), INTERVAL 14 DAY)\nORDER BY MAX(date)",
+ "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n MAX(subscription_tier) as 'Tier',\n ROUND(SUM(credits_used), 1) as 'Total Credits Used',\n MAX(date) as 'Last Activity'\nFROM lake._tool_kiro_user_report\nWHERE $__timeFilter(date)\n AND subscription_tier = 'POWER'\nGROUP BY user_id\nHAVING MAX(date) < DATE_SUB(NOW(), INTERVAL 14 DAY)\nORDER BY MAX(date)",
"refId": "A"
}
],
@@ -679,12 +727,15 @@
},
"id": 103,
"panels": [],
- "title": "Cross-Source: User Productivity (new report + legacy metrics)",
+ "title": "Per-User Usage & Efficiency",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Per-user productivity combining credits (new format) with feature metrics (legacy). Only shows users present in both data sources.",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Credits, messages, conversations, and credits per message. Accepted LOC is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -733,15 +784,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(MAX(d.display_name), d.user_id) as 'User',\n COALESCE(MAX(r.subscription_tier), '') as 'Tier',\n ROUND(SUM(r.credits_used), 1) as 'Credits Used',\n SUM(d.chat_ai_code_lines + d.inline_ai_code_lines + d.code_fix_accepted_lines + d.dev_accepted_lines) as 'Total Accepted Lines',\n CASE WHEN SUM(d.chat_ai_code_lines + d.inline_ai_code_lines + d.code_fix_accepted_lines + d.dev_accepted_lines) > 0\n THEN ROUND(SUM(r.credits_used) / SUM(d.chat_ai_c [...]
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS 'User', MAX(subscription_tier) AS 'Tier', ROUND(SUM(credits_used), 1) AS 'Credits Used', SUM(total_messages) AS 'Messages', SUM(chat_conversations) AS 'Conversations', ROUND(SUM(credits_used) / NULLIF(SUM(total_messages), 0), 3) AS 'Credits per Message', MAX(date) AS 'Last Activity' FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY user_id ORDER BY SUM(credits_used) DESC",
"refId": "A"
}
],
- "title": "User Productivity & Efficiency",
+ "title": "Per-User Usage & Efficiency",
"type": "table"
}
],
@@ -749,9 +803,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "executive",
- "kiro"
+ "kiro",
+ "executive"
],
"templating": {
"list": []
@@ -763,6 +816,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro Executive Dashboard",
- "uid": "qdev_executive",
+ "uid": "kiro_executive",
"version": 1
}
diff --git a/grafana/dashboards/mysql/qdev_feature_metrics.json b/grafana/dashboards/mysql/kiro_feature_metrics.json
similarity index 71%
rename from grafana/dashboards/mysql/qdev_feature_metrics.json
rename to grafana/dashboards/mysql/kiro_feature_metrics.json
index 5156e652a..58604d023 100644
--- a/grafana/dashboards/mysql/qdev_feature_metrics.json
+++ b/grafana/dashboards/mysql/kiro_feature_metrics.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "High-level summary of legacy feature-level activity metrics (from by_user_analytic CSV reports)",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro usage-report metrics. Legacy accepted LOC and feature counters are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,15 +69,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COUNT(DISTINCT user_id) as 'Active Users',\n SUM(inline_suggestions_count) as 'Inline Suggestions',\n SUM(inline_acceptance_count) as 'Inline Accepted',\n SUM(chat_messages_sent) as 'Chat Messages',\n SUM(chat_ai_code_lines) as 'Chat AI Lines',\n SUM(code_review_findings_count) as 'Review Findings',\n SUM(test_generation_event_count) as 'Test Gen Events',\n SUM(dev_accepted_lines) as 'Agentic Lines'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilt [...]
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS 'Active Users', SUM(total_messages) AS 'Messages', SUM(chat_conversations) AS 'Conversations', ROUND(SUM(credits_used), 1) AS 'Credits Used' FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Legacy Feature Metrics Overview",
+ "title": "Kiro Usage Overview",
"type": "stat"
},
{
@@ -87,12 +93,15 @@
},
"id": 20,
"panels": [],
- "title": "Inline Suggestions",
+ "title": "Completions",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily inline suggestion and acceptance counts",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Returned suggestions are offers, not acceptance events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -170,20 +179,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(inline_suggestions_count) as 'Suggestions',\n SUM(inline_acceptance_count) as 'Accepted',\n SUM(inline_ai_code_lines) as 'AI Code Lines'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(timestamp) AS time, COUNT(*) AS 'Completion Requests', SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) AS 'Requests with Results', SUM(returned_line_count) AS 'Returned Lines' FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Inline Suggestions & Acceptance",
+ "title": "Completion Requests & Results",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Acceptance rates for inline suggestions, code fix, and inline chat over time",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Percentage of completion requests that returned at least one suggestion. Kiro does not export acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -261,15 +276,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) as 'Inline Suggestions',\n SUM(code_fix_acceptance_event_count) / NULLIF(SUM(code_fix_generation_event_count), 0) as 'Code Fix',\n SUM(inline_chat_acceptance_event_count) / NULLIF(SUM(inline_chat_total_event_count), 0) as 'Inline Chat'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0) AS 'Suggestion Return Rate' FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Acceptance Rate Trends",
+ "title": "Suggestion Return Rate",
"type": "timeseries"
},
{
@@ -282,12 +300,15 @@
},
"id": 21,
"panels": [],
- "title": "Chat & Agentic (Dev)",
+ "title": "Chat & Agent Continuations",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily chat messages sent and AI-generated code lines from chat",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "User turns and agent self-continuations from chat logs.",
"fieldConfig": {
"defaults": {
"color": {
@@ -365,11 +386,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(chat_messages_sent) as 'Messages Sent',\n SUM(chat_messages_interacted) as 'Messages Interacted',\n SUM(chat_ai_code_lines) as 'AI Code Lines'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(timestamp) AS time, COUNT(*) AS 'Chat Events', SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS 'User Turns', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS 'Agent Continuations' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
@@ -377,8 +401,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Agentic (Dev) code generation and acceptance metrics",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Agent continuations are empty-prompt records after tool calls; this measures autonomy, not accepted code.",
"fieldConfig": {
"defaults": {
"color": {
@@ -456,15 +483,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(dev_generation_event_count) as 'Generation Events',\n SUM(dev_generated_lines) as 'Generated Lines',\n SUM(dev_accepted_lines) as 'Accepted Lines',\n SUM(dev_acceptance_event_count) as 'Acceptance Events'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS 'User Turns', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS 'Agent Continuations', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0) AS 'Agent Continuation Rate' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Agentic (Dev) Activity",
+ "title": "Agent Continuation Activity",
"type": "timeseries"
},
{
@@ -477,12 +507,15 @@
},
"id": 22,
"panels": [],
- "title": "Code Review, Test Gen & Transformations",
+ "title": "Models, Prompts & Clients",
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Code review findings and test generation metrics over time",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Authoritative model and routing-mode message counts from daily reports.",
"fieldConfig": {
"defaults": {
"color": {
@@ -560,20 +593,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(code_review_findings_count) as 'Review Findings',\n SUM(code_review_succeeded_event_count) as 'Reviews Succeeded',\n SUM(code_review_failed_event_count) as 'Reviews Failed'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(date) AS time, model_name AS metric, SUM(message_count) AS value FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY DATE(date), model_name ORDER BY time",
"refId": "A"
}
],
- "title": "Code Review Activity",
+ "title": "Model / Route Message Mix",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Test generation events and acceptance over time",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Daily average prompt and response lengths. Test-generation counts are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -651,20 +690,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(test_generation_event_count) as 'Test Gen Events',\n SUM(test_generation_generated_tests) as 'Tests Generated',\n SUM(test_generation_accepted_tests) as 'Tests Accepted',\n SUM(test_generation_generated_lines) as 'Lines Generated',\n SUM(test_generation_accepted_lines) as 'Lines Accepted'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(timestamp) AS time, ROUND(AVG(prompt_length)) AS 'Avg Prompt Length', ROUND(AVG(response_length)) AS 'Avg Response Length' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Test Generation Activity",
+ "title": "Prompt & Response Length",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Doc generation and code transformation events",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Messages by KIRO_IDE, KIRO_CLI, KIRO_WEB, and PLUGIN. Doc-generation metrics are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -742,20 +787,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(doc_generation_event_count) as 'Doc Gen Events',\n SUM(doc_generation_accepted_line_additions) as 'Doc Lines Accepted',\n SUM(transformation_event_count) as 'Transformation Events',\n SUM(transformation_lines_generated) as 'Transform Lines Generated'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT DATE(date) AS time, client_type AS metric, SUM(total_messages) AS value FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY DATE(date), client_type ORDER BY time",
"refId": "A"
}
],
- "title": "Doc Generation & Transformations",
+ "title": "Client Type Message Mix",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Number of users who used each feature in the selected period",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Distinct users observed in chat, completion, steering, and spec-mode signals.",
"fieldConfig": {
"defaults": {
"color": {
@@ -838,11 +889,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT 'Chat' as Feature, COUNT(DISTINCT CASE WHEN chat_messages_sent > 0 THEN user_id END) as Users FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date)\nUNION ALL SELECT 'Inline Suggestions', COUNT(DISTINCT CASE WHEN inline_suggestions_count > 0 THEN user_id END) FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date)\nUNION ALL SELECT 'Code Fix', COUNT(DISTINCT CASE WHEN code_fix_generation_event_count > 0 THEN user_id END) FROM lake._tool_q_dev_user_data W [...]
+ "rawSql": "SELECT 'Chat' AS 'Feature', COUNT(DISTINCT user_id) AS 'Users' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Completion' AS 'Feature', COUNT(DISTINCT user_id) AS 'Users' FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Steering' AS 'Feature', COUNT(DISTINCT CASE WHEN has_steering = 1 THEN user_id END) AS 'Users' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Spec Mode' AS 'Feature', [...]
"refId": "A"
}
],
@@ -863,8 +917,11 @@
"type": "row"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Per-user breakdown of legacy feature-level metrics",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Per-user chat, completion, autonomy, steering, and spec-mode activity.",
"fieldConfig": {
"defaults": {
"color": {
@@ -913,15 +970,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n SUM(inline_suggestions_count) as 'Suggestions',\n SUM(inline_acceptance_count) as 'Accepted',\n CONCAT(ROUND(SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) * 100, 1), '%') as 'Accept %',\n SUM(chat_messages_sent) as 'Chat Msgs',\n SUM(chat_ai_code_lines) as 'Chat Lines',\n SUM(dev_accepted_lines) as 'Agentic Lines',\n SUM(code_review_findings_count) as 'Review Findings',\n SU [...]
+ "rawSql": "WITH users AS (SELECT user_id FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION SELECT user_id FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp)), chat AS (SELECT user_id, COUNT(*) AS chat_events, SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS user_turns, SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS agent_continuations, SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) AS steering, SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) AS [...]
"refId": "A"
}
],
- "title": "Per-User Feature Metrics",
+ "title": "Per-User Kiro Activity",
"type": "table"
}
],
@@ -929,8 +989,6 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "legacy",
"kiro"
],
"templating": {
@@ -942,7 +1000,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Kiro Legacy Feature Metrics",
- "uid": "qdev_feature_metrics",
+ "title": "Kiro Feature Metrics",
+ "uid": "kiro_feature_metrics",
"version": 1
}
diff --git a/grafana/dashboards/mysql/qdev_logging.json b/grafana/dashboards/mysql/kiro_logging.json
similarity index 74%
rename from grafana/dashboards/mysql/qdev_logging.json
rename to grafana/dashboards/mysql/kiro_logging.json
index aa7826ae2..538b907aa 100644
--- a/grafana/dashboards/mysql/qdev_logging.json
+++ b/grafana/dashboards/mysql/kiro_logging.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Overview of logging event metrics",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Chat users, user turns, agent continuations, and completion events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,11 +69,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n (SELECT COUNT(*) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)) as 'Chat Events',\n (SELECT COUNT(DISTINCT user_id) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)) as 'Chat Users',\n (SELECT COUNT(DISTINCT conversation_id) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) AND conversation_id != '') as 'Conversations',\n (SELECT COUNT(*) FROM lake._tool_q_dev_completion_log WHERE $__timeFilter(timestamp)) as 'Com [...]
+ "rawSql": "SELECT (SELECT COUNT(*) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS 'Chat Events', (SELECT COUNT(DISTINCT user_id) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS 'Chat Users', (SELECT SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS 'User Turns', (SELECT SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS 'Agent Continuations [...]
"refId": "A"
}
],
@@ -78,7 +84,10 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Hourly distribution of AI usage activity (chat + completions)",
"fieldConfig": {
"defaults": {
@@ -155,11 +164,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n LPAD(CAST(hour_of_day AS CHAR), 2, '0') as 'Hour',\n SUM(chat_count) as 'Chat Events',\n SUM(completion_count) as 'Completion Events'\nFROM (\n SELECT HOUR(timestamp) as hour_of_day, COUNT(*) as chat_count, 0 as completion_count\n FROM lake._tool_q_dev_chat_log\n WHERE $__timeFilter(timestamp)\n GROUP BY HOUR(timestamp)\n UNION ALL\n SELECT HOUR(timestamp) as hour_of_day, 0 as chat_count, COUNT(*) as completion_count\n FROM lake._tool_q_dev_complet [...]
+ "rawSql": "SELECT\n LPAD(CAST(hour_of_day AS CHAR), 2, '0') as 'Hour',\n SUM(chat_count) as 'Chat Events',\n SUM(completion_count) as 'Completion Events'\nFROM (\n SELECT HOUR(timestamp) as hour_of_day, COUNT(*) as chat_count, 0 as completion_count\n FROM lake._tool_kiro_chat_log\n WHERE $__timeFilter(timestamp)\n GROUP BY HOUR(timestamp)\n UNION ALL\n SELECT HOUR(timestamp) as hour_of_day, 0 as chat_count, COUNT(*) as completion_count\n FROM lake._tool_kiro_completio [...]
"refId": "A"
}
],
@@ -167,7 +179,10 @@
"type": "barchart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Distribution of chat trigger types: MANUAL (chat window) vs INLINE_CHAT",
"fieldConfig": {
"defaults": {
@@ -223,11 +238,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n CASE\n WHEN chat_trigger_type = '' OR chat_trigger_type IS NULL THEN '(unknown)'\n ELSE chat_trigger_type\n END as 'Trigger Type',\n COUNT(*) as 'Events'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY chat_trigger_type\nORDER BY COUNT(*) DESC",
+ "rawSql": "SELECT\n CASE\n WHEN chat_trigger_type = '' OR chat_trigger_type IS NULL THEN '(unknown)'\n ELSE chat_trigger_type\n END as 'Trigger Type',\n COUNT(*) as 'Events'\nFROM lake._tool_kiro_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY chat_trigger_type\nORDER BY COUNT(*) DESC",
"refId": "A"
}
],
@@ -235,8 +253,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Distribution of model usage across chat events",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Authoritative model and routing-mode counts from daily reports; chat model_id is only partially populated.",
"fieldConfig": {
"defaults": {
"color": {
@@ -280,7 +301,7 @@
"calcs": [
"lastNotNull"
],
- "fields": "/^Requests$/",
+ "fields": "/^Messages$/",
"values": true
},
"tooltip": {
@@ -291,19 +312,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n CASE\n WHEN model_id = '' OR model_id IS NULL THEN '(unknown)'\n ELSE model_id\n END as 'Model',\n COUNT(*) as 'Requests'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY model_id\nORDER BY COUNT(*) DESC",
+ "rawSql": "SELECT model_name AS 'Model / Route', SUM(message_count) AS 'Messages' FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY model_name ORDER BY SUM(message_count) DESC",
"refId": "A"
}
],
- "title": "Model Usage Distribution",
+ "title": "Model / Route Message Distribution",
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Top file extensions used with inline completions",
"fieldConfig": {
"defaults": {
@@ -359,11 +386,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n CASE\n WHEN file_extension = '' THEN '(unknown)'\n ELSE file_extension\n END as 'File Type',\n COUNT(*) as 'Completions'\nFROM lake._tool_q_dev_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY file_extension\nORDER BY COUNT(*) DESC\nLIMIT 15",
+ "rawSql": "SELECT\n CASE\n WHEN file_extension = '' THEN '(unknown)'\n ELSE file_extension\n END as 'File Type',\n COUNT(*) as 'Completions'\nFROM lake._tool_kiro_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY file_extension\nORDER BY COUNT(*) DESC\nLIMIT 15",
"refId": "A"
}
],
@@ -371,8 +401,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Average number of chat events per conversation",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Conversation IDs are absent in sampled Kiro logs, so conversation depth cannot be computed.",
"fieldConfig": {
"defaults": {
"color": {
@@ -451,19 +484,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n DATE(timestamp) as time,\n COUNT(*) / NULLIF(COUNT(DISTINCT CASE WHEN conversation_id != '' THEN conversation_id END), 0) as 'Avg Turns per Conversation',\n COUNT(DISTINCT CASE WHEN conversation_id != '' THEN conversation_id END) as 'Unique Conversations',\n COUNT(*) as 'Total Chat Events'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS 'User Turns', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS 'Agent Continuations', SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) * 100.0 / NULLIF(COUNT(*), 0) AS 'Agent Continuation Rate' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Conversation Depth Analysis",
+ "title": "User Turns vs Agent Continuations",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Daily chat and completion events over time",
"fieldConfig": {
"defaults": {
@@ -543,11 +582,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT time, SUM(chat) as 'Chat Events', SUM(completions) as 'Completion Events'\nFROM (\n SELECT DATE(timestamp) as time, COUNT(*) as chat, 0 as completions\n FROM lake._tool_q_dev_chat_log\n WHERE $__timeFilter(timestamp)\n GROUP BY DATE(timestamp)\n UNION ALL\n SELECT DATE(timestamp) as time, 0 as chat, COUNT(*) as completions\n FROM lake._tool_q_dev_completion_log\n WHERE $__timeFilter(timestamp)\n GROUP BY DATE(timestamp)\n) combined\nGROUP BY time\nORD [...]
+ "rawSql": "SELECT time, SUM(chat) as 'Chat Events', SUM(completions) as 'Completion Events'\nFROM (\n SELECT DATE(timestamp) as time, COUNT(*) as chat, 0 as completions\n FROM lake._tool_kiro_chat_log\n WHERE $__timeFilter(timestamp)\n GROUP BY DATE(timestamp)\n UNION ALL\n SELECT DATE(timestamp) as time, 0 as chat, COUNT(*) as completions\n FROM lake._tool_kiro_completion_log\n WHERE $__timeFilter(timestamp)\n GROUP BY DATE(timestamp)\n) combined\nGROUP BY time\nORDER [...]
"refId": "A"
}
],
@@ -555,8 +597,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Per-user logging activity summary",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Per-user chat and completion activity with display names resolved from usage reports.",
"fieldConfig": {
"defaults": {
"color": {
@@ -605,11 +650,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(u.display_name, u.user_id) as 'User',\n u.user_id as 'User ID',\n u.chat_events as 'Chat Events',\n u.conversations as 'Conversations',\n ROUND(u.chat_events / NULLIF(u.conversations, 0), 1) as 'Avg Turns',\n COALESCE(c.completion_events, 0) as 'Completion Events',\n COALESCE(c.files_count, 0) as 'Distinct Files',\n ROUND(u.avg_prompt_len) as 'Avg Prompt Len',\n ROUND(u.avg_response_len) as 'Avg Response Len',\n u.steering_count as 'Steeri [...]
+ "rawSql": "WITH chat AS (SELECT user_id, COUNT(*) AS chat_events, SUM(CASE WHEN has_prompt = 1 THEN 1 ELSE 0 END) AS user_turns, SUM(CASE WHEN has_prompt = 0 THEN 1 ELSE 0 END) AS agent_continuations FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY user_id), completion AS (SELECT user_id, COUNT(*) AS completion_events, SUM(returned_line_count) AS returned_lines FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY user_id), names AS (SELECT user [...]
"refId": "A"
}
],
@@ -617,7 +665,10 @@
"type": "table"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Distribution of Kiro feature adoption: Steering, Spec Mode, and Plain Chat",
"fieldConfig": {
"defaults": {
@@ -673,11 +724,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) as 'Using Steering',\n SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) as 'Using Spec Mode',\n SUM(CASE WHEN has_steering = 0 AND is_spec_mode = 0 THEN 1 ELSE 0 END) as 'Plain Chat'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT\n SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) as 'Using Steering',\n SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) as 'Using Spec Mode',\n SUM(CASE WHEN has_steering = 0 AND is_spec_mode = 0 THEN 1 ELSE 0 END) as 'Plain Chat'\nFROM lake._tool_kiro_chat_log\nWHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
@@ -685,8 +739,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Top file extensions active during chat events",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Chat logs do not contain active file extensions; completion logs provide file types and returned lines.",
"fieldConfig": {
"defaults": {
"color": {
@@ -741,20 +798,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n CASE\n WHEN active_file_extension = '' OR active_file_extension IS NULL THEN '(no file active)'\n ELSE active_file_extension\n END as 'File Type',\n COUNT(*) as 'Chat Events'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY active_file_extension\nORDER BY COUNT(*) DESC\nLIMIT 15",
+ "rawSql": "SELECT CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS 'File Type', SUM(returned_line_count) AS 'Returned Lines' FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY file_extension ORDER BY SUM(returned_line_count) DESC",
"refId": "A"
}
],
- "title": "Active File Types in Chat",
+ "title": "Returned Lines by File Type",
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "How often Kiro responses include code references and web links",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Kiro logs expose follow-up prompts but not code-reference or web-link counters.",
"fieldConfig": {
"defaults": {
"color": {
@@ -809,19 +872,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n SUM(CASE WHEN code_reference_count > 0 THEN 1 ELSE 0 END) as 'With Code References',\n SUM(CASE WHEN web_link_count > 0 THEN 1 ELSE 0 END) as 'With Web Links',\n SUM(CASE WHEN has_followup_prompts = 1 THEN 1 ELSE 0 END) as 'With Followup Prompts',\n SUM(CASE WHEN code_reference_count = 0 AND web_link_count = 0 AND has_followup_prompts = 0 THEN 1 ELSE 0 END) as 'Plain Response'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT SUM(CASE WHEN has_followup_prompts = 1 THEN 1 ELSE 0 END) AS 'With Follow-up Prompts', SUM(CASE WHEN has_followup_prompts = 0 THEN 1 ELSE 0 END) AS 'Without Follow-up Prompts' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
- "title": "Response Enrichment Breakdown",
+ "title": "Follow-up Prompt Breakdown",
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Average and maximum prompt/response lengths over time",
"fieldConfig": {
"defaults": {
@@ -901,11 +970,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n DATE(timestamp) as time,\n AVG(prompt_length) as 'Avg Prompt Length',\n AVG(response_length) as 'Avg Response Length',\n MAX(prompt_length) as 'Max Prompt Length',\n MAX(response_length) as 'Max Response Length'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
+ "rawSql": "SELECT\n DATE(timestamp) as time,\n AVG(prompt_length) as 'Avg Prompt Length',\n AVG(response_length) as 'Avg Response Length',\n MAX(prompt_length) as 'Max Prompt Length',\n MAX(response_length) as 'Max Response Length'\nFROM lake._tool_kiro_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
"refId": "A"
}
],
@@ -913,7 +985,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Average code context size provided to inline completions over time",
"fieldConfig": {
"defaults": {
@@ -992,11 +1067,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n DATE(timestamp) as time,\n ROUND(AVG(left_context_length)) as 'Avg Left Context',\n ROUND(AVG(right_context_length)) as 'Avg Right Context',\n ROUND(AVG(left_context_length + right_context_length)) as 'Avg Total Context'\nFROM lake._tool_q_dev_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
+ "rawSql": "SELECT\n DATE(timestamp) as time,\n ROUND(AVG(left_context_length)) as 'Avg Left Context',\n ROUND(AVG(right_context_length)) as 'Avg Right Context',\n ROUND(AVG(left_context_length + right_context_length)) as 'Avg Total Context'\nFROM lake._tool_kiro_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
"refId": "A"
}
],
@@ -1004,8 +1082,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily trend of code references and web links in chat responses",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Daily responses with and without follow-up prompts. Code-reference and web-link counters are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1083,15 +1164,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n DATE(timestamp) as time,\n SUM(code_reference_count) as 'Code References',\n SUM(web_link_count) as 'Web Links',\n SUM(CASE WHEN has_followup_prompts = 1 THEN 1 ELSE 0 END) as 'Followup Prompts'\nFROM lake._tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp)\nORDER BY DATE(timestamp)",
+ "rawSql": "SELECT DATE(timestamp) AS time, SUM(CASE WHEN has_followup_prompts = 1 THEN 1 ELSE 0 END) AS 'With Follow-up Prompts', SUM(CASE WHEN has_followup_prompts = 0 THEN 1 ELSE 0 END) AS 'Without Follow-up Prompts' FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY DATE(timestamp) ORDER BY time",
"refId": "A"
}
],
- "title": "Response Enrichment Trends",
+ "title": "Follow-up Prompt Trends",
"type": "timeseries"
}
],
@@ -1099,9 +1183,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "logging",
- "kiro"
+ "kiro",
+ "logging"
],
"templating": {
"list": []
@@ -1113,6 +1196,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro AI Activity Insights",
- "uid": "qdev_logging",
+ "uid": "kiro_logging",
"version": 1
}
diff --git a/grafana/dashboards/mysql/qdev_user_report.json b/grafana/dashboards/mysql/kiro_user_report.json
similarity index 82%
rename from grafana/dashboards/mysql/qdev_user_report.json
rename to grafana/dashboards/mysql/kiro_user_report.json
index acd0f14b3..394185975 100644
--- a/grafana/dashboards/mysql/qdev_user_report.json
+++ b/grafana/dashboards/mysql/kiro_user_report.json
@@ -19,7 +19,10 @@
"links": [],
"panels": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Overview of credits and usage metrics",
"fieldConfig": {
"defaults": {
@@ -66,11 +69,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n SUM(credits_used) as 'Total Credits Used',\n COUNT(DISTINCT user_id) as 'Active Users',\n SUM(total_messages) as 'Total Messages',\n SUM(chat_conversations) as 'Total Conversations'\nFROM lake._tool_q_dev_user_report\nWHERE $__timeFilter(date)",
+ "rawSql": "SELECT\n SUM(credits_used) as 'Total Credits Used',\n COUNT(DISTINCT user_id) as 'Active Users',\n SUM(total_messages) as 'Total Messages',\n SUM(chat_conversations) as 'Total Conversations'\nFROM lake._tool_kiro_user_report\nWHERE $__timeFilter(date)",
"refId": "A"
}
],
@@ -78,7 +84,10 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Daily credits consumed broken down by subscription tier",
"fieldConfig": {
"defaults": {
@@ -158,11 +167,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n subscription_tier as metric,\n SUM(credits_used) as value\nFROM lake._tool_q_dev_user_report\nWHERE $__timeFilter(date)\nGROUP BY date, subscription_tier\nORDER BY date",
+ "rawSql": "SELECT\n date as time,\n subscription_tier as metric,\n SUM(credits_used) as value\nFROM lake._tool_kiro_user_report\nWHERE $__timeFilter(date)\nGROUP BY date, subscription_tier\nORDER BY date",
"refId": "A"
}
],
@@ -170,8 +182,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily messages and conversations broken down by client type",
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
+ "description": "Daily messages by Kiro IDE, CLI, Web, and Plugin clients, plus conversations.",
"fieldConfig": {
"defaults": {
"color": {
@@ -250,11 +265,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(CASE WHEN client_type = 'KIRO_IDE' THEN total_messages ELSE 0 END) as 'Messages (IDE)',\n SUM(CASE WHEN client_type = 'KIRO_CLI' THEN total_messages ELSE 0 END) as 'Messages (CLI)',\n SUM(CASE WHEN client_type = 'PLUGIN' THEN total_messages ELSE 0 END) as 'Messages (Plugin)',\n SUM(chat_conversations) as 'Conversations'\nFROM lake._tool_q_dev_user_report\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT date AS time, SUM(CASE WHEN client_type = 'KIRO_IDE' THEN total_messages ELSE 0 END) AS 'Messages (IDE)', SUM(CASE WHEN client_type = 'KIRO_CLI' THEN total_messages ELSE 0 END) AS 'Messages (CLI)', SUM(CASE WHEN client_type = 'KIRO_WEB' THEN total_messages ELSE 0 END) AS 'Messages (Web)', SUM(CASE WHEN client_type = 'PLUGIN' THEN total_messages ELSE 0 END) AS 'Messages (Plugin)', SUM(chat_conversations) AS 'Conversations' FROM _tool_kiro_user_report WHERE $__t [...]
"refId": "A"
}
],
@@ -262,7 +280,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Distribution of users across subscription tiers",
"fieldConfig": {
"defaults": {
@@ -318,11 +339,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n subscription_tier as 'Tier',\n COUNT(DISTINCT user_id) as 'Users'\nFROM lake._tool_q_dev_user_report\nWHERE $__timeFilter(date)\n AND subscription_tier IS NOT NULL\n AND subscription_tier != ''\nGROUP BY subscription_tier\nORDER BY COUNT(DISTINCT user_id) DESC",
+ "rawSql": "SELECT\n subscription_tier as 'Tier',\n COUNT(DISTINCT user_id) as 'Users'\nFROM lake._tool_kiro_user_report\nWHERE $__timeFilter(date)\n AND subscription_tier IS NOT NULL\n AND subscription_tier != ''\nGROUP BY subscription_tier\nORDER BY COUNT(DISTINCT user_id) DESC",
"refId": "A"
}
],
@@ -330,7 +354,10 @@
"type": "piechart"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"description": "Per-user credits, messages, and subscription details",
"fieldConfig": {
"defaults": {
@@ -429,11 +456,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "mysql",
+ "uid": "devlake-mysql-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n subscription_tier as 'Tier',\n client_type as 'Client',\n SUM(credits_used) as 'Credits Used',\n SUM(total_messages) as 'Messages',\n SUM(chat_conversations) as 'Conversations',\n SUM(overage_credits_used) as 'Overage Credits',\n CASE WHEN MAX(CAST(overage_enabled AS UNSIGNED)) = 1 THEN 'Yes' ELSE 'No' END as 'Overage',\n MIN(date) as 'First Activity',\n MAX(date) as 'Last Activity'\nFROM lake._tool [...]
+ "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n subscription_tier as 'Tier',\n client_type as 'Client',\n SUM(credits_used) as 'Credits Used',\n SUM(total_messages) as 'Messages',\n SUM(chat_conversations) as 'Conversations',\n SUM(overage_credits_used) as 'Overage Credits',\n CASE WHEN MAX(CAST(overage_enabled AS UNSIGNED)) = 1 THEN 'Yes' ELSE 'No' END as 'Overage',\n MIN(date) as 'First Activity',\n MAX(date) as 'Last Activity'\nFROM lake._tool [...]
"refId": "A"
}
],
@@ -445,9 +475,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "user_report",
- "kiro"
+ "kiro",
+ "user_report"
],
"templating": {
"list": []
@@ -459,6 +488,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro Usage Dashboard",
- "uid": "qdev_user_report",
+ "uid": "kiro_user_report",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/ai-model-roi.json b/grafana/dashboards/postgresql/ai-model-roi.json
index ffbda08b2..1a1c1205f 100644
--- a/grafana/dashboards/postgresql/ai-model-roi.json
+++ b/grafana/dashboards/postgresql/ai-model-roi.json
@@ -26,7 +26,7 @@
"targetBlank": true,
"title": "Kiro Usage Dashboard",
"type": "link",
- "url": "/d/qdev_user_report"
+ "url": "/d/kiro_user_report"
}
],
"panels": [
@@ -87,7 +87,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(SUM(credits_used)) AS \"Total Credits\" FROM _tool_q_dev_user_report WHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(SUM(credits_used)) AS \"Total Credits\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
@@ -138,7 +138,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT pr.id), 0), 0), 0), 1) AS \"Credits / PR\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM pull_requests WHERE NOT merged_date IS NULL AND $__timeFilter(merged_date)) AS pr WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT pr.id), 0), 0), 0), 1) AS \"Credits / PR\" FROM _tool_kiro_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM pull_requests WHERE NOT merged_date IS NULL AND $__timeFilter(merged_date)) AS pr WHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -189,7 +189,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT cdc.cicd_deployment_id), 0), 0), 0), 1) AS \"Credits / Deploy\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT cicd_deployment_id FROM cicd_deployment_commits WHERE result = 'SUCCESS' AND environment = 'PRODUCTION' AND $__timeFilter(finished_date)) AS cdc WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT cdc.cicd_deployment_id), 0), 0), 0), 1) AS \"Credits / Deploy\" FROM _tool_kiro_user_report AS r CROSS JOIN (SELECT DISTINCT cicd_deployment_id FROM cicd_deployment_commits WHERE result = 'SUCCESS' AND environment = 'PRODUCTION' AND $__timeFilter(finished_date)) AS cdc WHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -240,7 +240,7 @@
"datasource": "postgresql",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT i.id), 0), 0), 0), 1) AS \"Credits / Issue\" FROM _tool_q_dev_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM issues WHERE NOT resolution_date IS NULL AND type <> 'INCIDENT' AND $__timeFilter(resolution_date)) AS i WHERE $__timeFilter(r.date)",
+ "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS DECIMAL) / NULLIF(NULLIF(NULLIF(COUNT(DISTINCT i.id), 0), 0), 0), 1) AS \"Credits / Issue\" FROM _tool_kiro_user_report AS r CROSS JOIN (SELECT DISTINCT id FROM issues WHERE NOT resolution_date IS NULL AND type <> 'INCIDENT' AND $__timeFilter(resolution_date)) AS i WHERE $__timeFilter(r.date)",
"refId": "A"
}
],
@@ -316,7 +316,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _prs AS (SELECT CAST(merged_date AS DATE) - (EXTRACT(ISODOW FROM merged_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS prs FROM pull_requests WHERE NOT merged_date IS NULL AND $__tim [...]
+ "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _prs AS (SELECT CAST(merged_date AS DATE) - (EXTRACT(ISODOW FROM merged_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS prs FROM pull_requests WHERE NOT merged_date IS NULL AND $__time [...]
"refId": "A"
}
],
@@ -379,7 +379,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _deploys AS (SELECT CAST(finished_date AS DATE) - (EXTRACT(ISODOW FROM finished_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(DISTINCT cicd_deployment_id) AS deploys FROM cicd_deployment_ [...]
+ "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _deploys AS (SELECT CAST(finished_date AS DATE) - (EXTRACT(ISODOW FROM finished_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(DISTINCT cicd_deployment_id) AS deploys FROM cicd_deployment_c [...]
"refId": "A"
}
],
@@ -442,7 +442,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _issues AS (SELECT CAST(resolution_date AS DATE) - (EXTRACT(ISODOW FROM resolution_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS resolved FROM issues WHERE NOT resolution_date IS NU [...]
+ "rawSql": "WITH _credits AS (SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS week_start, SUM(credits_used) AS credits FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day'), _issues AS (SELECT CAST(resolution_date AS DATE) - (EXTRACT(ISODOW FROM resolution_date) - 1) * INTERVAL '1 day' AS week_start, COUNT(*) AS resolved FROM issues WHERE NOT resolution_date IS NUL [...]
"refId": "A"
}
],
@@ -505,7 +505,7 @@
"datasource": "postgresql",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS time, SUM(credits_used) AS \"Credits\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' ORDER BY time NULLS FIRST",
+ "rawSql": "SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' AS time, SUM(credits_used) AS \"Credits\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM date) - 1) * INTERVAL '1 day' ORDER BY time NULLS FIRST",
"refId": "A"
}
],
@@ -517,7 +517,6 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
"kiro",
"cost",
"efficiency"
@@ -531,7 +530,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "AI Cost-Efficiency (PostgreSQL)",
- "uid": "ai_cost_efficiency-pg",
+ "title": "AI Model ROI",
+ "uid": "ai_model_roi-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/q-dev-dora.json b/grafana/dashboards/postgresql/kiro-dora.json
similarity index 62%
rename from grafana/dashboards/postgresql/q-dev-dora.json
rename to grafana/dashboards/postgresql/kiro-dora.json
index 2a5368236..fecbc0cb4 100644
--- a/grafana/dashboards/postgresql/q-dev-dora.json
+++ b/grafana/dashboards/postgresql/kiro-dora.json
@@ -36,10 +36,10 @@
"keepTime": true,
"tags": [],
"targetBlank": true,
- "title": "Q Dev Dashboard",
+ "title": "Kiro Dashboard",
"tooltip": "",
"type": "link",
- "url": "/d/qdev_user_data/q-dev-user-data-dashboard"
+ "url": "/d/kiro_user_data/kiro-user-data-dashboard"
}
],
"panels": [
@@ -61,7 +61,7 @@
"showLineNumbers": false,
"showMiniMap": false
},
- "content": "## AI-Powered DORA Dashboard\nThis dashboard correlates **Q Dev (AI coding assistant)** usage metrics with **DORA** performance indicators to help understand the impact of AI-assisted development on engineering efficiency.\n\n- **Left side**: Q Dev AI usage metrics (code generation, acceptance rate)\n- **Right side**: DORA metrics (Lead Time, Deployment Frequency, Change Failure Rate)\n- **Correlation charts**: Show trends over time to identify potential relationships",
+ "content": "## Kiro + DORA Dashboard\nThis dashboard compares **Kiro usage** with **DORA** performance indicators at monthly aggregates.\n\n- **Kiro metrics**: active users, credits, messages, conversations, and credits per message\n- **DORA metrics**: lead time, deployment frequency, and change failure rate\n- **Semantic boundary**: Kiro does not export accepted LOC, suggestion acceptance, generated tests, or code-review findings; no proxy is presented as an equivalent measure",
"mode": "markdown"
},
"pluginVersion": "13.0.2",
@@ -82,8 +82,11 @@
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Number of unique users who used Q Dev AI features",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Unique Kiro users in the selected period, from the daily usage report.",
"fieldConfig": {
"defaults": {
"color": {
@@ -128,20 +131,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Q Dev Users\" FROM _tool_q_dev_user_data WHERE $__timeFilter(date)",
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Kiro Users\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Q Dev Active Users",
+ "title": "Kiro Active Users",
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Total AI-generated code lines accepted (Inline + Chat)",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro exports credits, not accepted lines of code. Accepted LOC has no equivalent field.",
"fieldConfig": {
"defaults": {
"color": {
@@ -187,20 +196,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT SUM(inline_ai_code_lines + chat_ai_code_lines) AS \"AI Accepted Lines\" FROM _tool_q_dev_user_data WHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(SUM(credits_used), 1) AS \"Kiro Credits Used\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Total AI Code Lines",
+ "title": "Total Kiro Credits",
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Acceptance rate of inline AI suggestions",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro does not export suggestion acceptance. Credits per message is a usage-efficiency ratio, not an acceptance rate.",
"fieldConfig": {
"defaults": {
"color": {
@@ -224,7 +239,7 @@
}
]
},
- "unit": "percentunit"
+ "unit": "none"
},
"overrides": []
},
@@ -254,19 +269,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS \"Acceptance Rate\" FROM _tool_q_dev_user_data WHERE $__timeFilter(date)",
+ "rawSql": "SELECT CAST(SUM(credits_used) AS NUMERIC) / NULLIF(SUM(total_messages), 0) AS \"Credits per Message\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "AI Acceptance Rate",
+ "title": "Credits per Message",
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Number of production deployments in selected period",
"fieldConfig": {
"defaults": {
@@ -312,7 +333,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -324,7 +348,10 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Median lead time for changes in hours",
"fieldConfig": {
"defaults": {
@@ -379,7 +406,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -391,7 +421,10 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Percentage of deployments that caused incidents",
"fieldConfig": {
"defaults": {
@@ -446,7 +479,10 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
@@ -467,12 +503,15 @@
},
"id": 9,
"panels": [],
- "title": "AI Usage vs DORA Metrics Correlation",
+ "title": "Kiro Usage vs DORA Metrics",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Compare AI code generation trends with Lead Time for Changes. A negative correlation (AI lines up, Lead Time down) suggests AI is helping accelerate delivery.",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro credits are compared with Lead Time. Kiro does not export accepted code lines.",
"fieldConfig": {
"defaults": {
"color": {
@@ -526,7 +565,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Accepted Lines"
+ "options": "Kiro Credits"
},
"properties": [
{
@@ -545,29 +584,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Median Lead Time (hours)"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Lead Time (hours)"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "orange",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -597,20 +613,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_monthly AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, SUM(inline_ai_code_lines + chat_ai_code_lines) AS ai_lines FROM _tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), lead_time_monthly AS (SELECT TO_CHAR(CAST(cdc.finished_date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(AVG(ppm.pr_cycle_time) AS NUMERIC) / NULLIF(60, 0) AS avg_lead_time FROM pull_requests AS pr JOIN project_pr_metr [...]
+ "rawSql": "WITH ai_monthly AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, SUM(credits_used) AS kiro_credits FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), lead_time_monthly AS (SELECT TO_CHAR(CAST(cdc.finished_date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(AVG(ppm.pr_cycle_time) AS NUMERIC) / NULLIF(60, 0) AS avg_lead_time FROM pull_requests AS pr JOIN project_pr_metrics AS ppm ON ppm.id = p [...]
"refId": "A"
}
],
- "title": "AI Code Generation vs Lead Time Trend",
+ "title": "Kiro Credits vs Lead Time Trend",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Compare AI suggestion acceptance rate with deployment frequency. Higher acceptance rate may indicate better AI integration and potentially more deployments.",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Usage-efficiency ratio versus deployment frequency. This is not suggestion acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -664,7 +686,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Acceptance Rate"
+ "options": "Credits per Message"
},
"properties": [
{
@@ -673,7 +695,7 @@
},
{
"id": "custom.axisLabel",
- "value": "Acceptance Rate"
+ "value": "Credits per Message"
},
{
"id": "unit",
@@ -687,29 +709,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Deployment Count"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Deployments"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "purple",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -739,20 +738,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_acceptance AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS acceptance_rate FROM _tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), deployment_count AS (SELECT TO_CHAR(CAST(MAX(cdc.finished_date) AS TIMESTAMP), 'YYYY-MM-01') AS month, COUNT(DISTINCT cdc.cicd_deployment_id) AS deploy_co [...]
+ "rawSql": "WITH ai_acceptance AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(SUM(credits_used) AS NUMERIC) / NULLIF(NULLIF(SUM(total_messages), 0), 0) AS credits_per_message FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), deployment_count AS (SELECT TO_CHAR(CAST(MAX(cdc.finished_date) AS TIMESTAMP), 'YYYY-MM-01') AS month, COUNT(DISTINCT cdc.cicd_deployment_id) AS deploy_count FROM cicd_de [...]
"refId": "A"
}
],
- "title": "AI Acceptance Rate vs Deployment Frequency",
+ "title": "Credits per Message vs Deployment Frequency",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Compare AI-generated tests with Change Failure Rate. More AI-generated tests might correlate with lower failure rates.",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro does not export generated-test counts; total messages is the available activity-volume measure.",
"fieldConfig": {
"defaults": {
"color": {
@@ -806,7 +811,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Generated Tests"
+ "options": "Kiro Messages"
},
"properties": [
{
@@ -825,33 +830,6 @@
}
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Change Failure Rate"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "right"
- },
- {
- "id": "custom.axisLabel",
- "value": "Failure Rate"
- },
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "red",
- "mode": "fixed"
- }
- }
- ]
}
]
},
@@ -881,20 +859,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_tests AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, SUM(test_generation_generated_tests) AS generated_tests FROM _tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), cfr_monthly AS (SELECT TO_CHAR(CAST(deployment_finished_date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(SUM(has_incident) AS NUMERIC) / NULLIF(NULLIF(COUNT(deployment_id), 0), 0) AS cfr FROM (SELECT d.deployment_id, d.dep [...]
+ "rawSql": "WITH ai_tests AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') AS month, SUM(total_messages) AS kiro_messages FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01')), cfr_monthly AS (SELECT TO_CHAR(CAST(deployment_finished_date AS TIMESTAMP), 'YYYY-MM-01') AS month, CAST(SUM(has_incident) AS NUMERIC) / NULLIF(NULLIF(COUNT(deployment_id), 0), 0) AS cfr FROM (SELECT d.deployment_id, d.deployment_finished_d [...]
"refId": "A"
}
],
- "title": "AI Test Generation vs Change Failure Rate",
+ "title": "Kiro Messages vs Change Failure Rate",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Compare active Q Dev users with Code Review findings. More AI-assisted code review might catch issues earlier.",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro does not export code-review findings. Shows active users and credits by month.",
"fieldConfig": {
"defaults": {
"color": {
@@ -948,30 +932,7 @@
{
"matcher": {
"id": "byName",
- "options": "Active Users"
- },
- "properties": [
- {
- "id": "custom.axisPlacement",
- "value": "left"
- },
- {
- "id": "custom.axisLabel",
- "value": "Users"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "blue",
- "mode": "fixed"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Code Review Findings"
+ "options": "Kiro Credits"
},
"properties": [
{
@@ -1019,15 +980,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT TO_DATE(TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01'), '%Y-%m-%d') AS time, COUNT(DISTINCT user_id) AS \"Active Users\", SUM(code_review_findings_count) AS \"Code Review Findings\" FROM _tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') ORDER BY time NULLS FIRST",
+ "rawSql": "SELECT TO_DATE(TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01'), '%Y-%m-%d') AS time, COUNT(DISTINCT user_id) AS \"Active Users\", SUM(credits_used) AS \"Kiro Credits\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM-01') ORDER BY time NULLS FIRST",
"refId": "A"
}
],
- "title": "Q Dev Users vs Code Review Findings",
+ "title": "Kiro Users vs Credits",
"type": "timeseries"
},
{
@@ -1044,8 +1008,11 @@
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Monthly summary comparing Q Dev AI metrics with DORA metrics side by side",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Monthly Kiro usage metrics beside DORA metrics. LOC, acceptance, generated tests, and review findings are not exported by Kiro.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1074,7 +1041,7 @@
{
"matcher": {
"id": "byName",
- "options": "AI Acceptance Rate"
+ "options": "Credits per Message"
},
"properties": [
{
@@ -1099,47 +1066,6 @@
"value": 1
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Change Failure Rate"
- },
- "properties": [
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "custom.cellOptions",
- "value": {
- "mode": "gradient",
- "type": "gauge"
- }
- },
- {
- "id": "color",
- "value": {
- "mode": "continuous-RdYlGr"
- }
- },
- {
- "id": "max",
- "value": 0.3
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Lead Time (hours)"
- },
- "properties": [
- {
- "id": "unit",
- "value": "h"
- }
- ]
}
]
},
@@ -1171,15 +1097,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "WITH ai_metrics AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM') AS month, COUNT(DISTINCT user_id) AS active_users, SUM(inline_ai_code_lines + chat_ai_code_lines) AS ai_lines, CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS acceptance_rate, SUM(test_generation_generated_tests) AS generated_tests, SUM(code_review_findings_count) AS review_findings FROM _tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY [...]
+ "rawSql": "WITH ai_metrics AS (SELECT TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM') AS month, COUNT(DISTINCT user_id) AS active_users, SUM(credits_used) AS credits, CAST(SUM(credits_used) AS NUMERIC) / NULLIF(NULLIF(SUM(total_messages), 0), 0) AS credits_per_message, SUM(total_messages) AS messages, SUM(chat_conversations) AS conversations FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY TO_CHAR(CAST(date AS TIMESTAMP), 'YYYY-MM')), dora_metrics AS (SELECT TO_CHAR(C [...]
"refId": "A"
}
],
- "title": "Monthly Q Dev vs DORA Metrics Comparison",
+ "title": "Monthly Kiro + DORA Metrics",
"type": "table"
}
],
@@ -1187,7 +1116,7 @@
"refresh": "5m",
"schemaVersion": 39,
"tags": [
- "q_dev",
+ "kiro",
"DORA",
"AI",
"correlation"
@@ -1204,7 +1133,10 @@
"$__all"
]
},
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"definition": "SELECT DISTINCT name FROM projects",
"hide": 0,
"includeAll": true,
@@ -1227,7 +1159,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Q Dev + DORA Correlation",
- "uid": "qdev_dora_correlation-pg",
+ "title": "Kiro + DORA Correlation",
+ "uid": "kiro_dora_correlation-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/mysql/qdev_user_data.json b/grafana/dashboards/postgresql/kiro_activity_detail.json
similarity index 70%
rename from grafana/dashboards/mysql/qdev_user_data.json
rename to grafana/dashboards/postgresql/kiro_activity_detail.json
index affaf5724..f67b94fd9 100644
--- a/grafana/dashboards/mysql/qdev_user_data.json
+++ b/grafana/dashboards/postgresql/kiro_activity_detail.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Overview of key user metrics",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Usage-report totals. Accepted LOC and acceptance rates are not exported by Kiro.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,13 +69,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n COUNT(DISTINCT user_id) as 'Active Users',\n SUM(chat_ai_code_lines) as 'Accepted Lines (Chat)',\n SUM(inline_ai_code_lines) as 'Accepted Lines (Inline Suggestion)',\n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) as 'Acceptance Rate (Inline Suggestion)',\n SUM(code_review_findings_count) as 'Findings (Code Review)',\n SUM(code_fix_accepted_lines) as 'Accepted Lines (Code Fix)',\n SUM(code_fix_acceptance_event_count) / NULLIF [...]
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Users\", ROUND(SUM(credits_used), 1) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A",
"select": [
[
@@ -115,8 +121,11 @@
"type": "stat"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily AI code line changes across all users",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Daily Kiro usage volume from the user report.",
"fieldConfig": {
"defaults": {
"color": {
@@ -195,13 +204,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(chat_ai_code_lines) as 'Chat Accepted Lines',\n SUM(code_fix_accepted_lines) as 'Code Fix Accepted Lines',\n SUM(code_fix_generated_lines) as 'Code Fix Generated Lines',\n SUM(transformation_lines_ingested) as 'Java Transform Ingested Lines',\n SUM(transformation_lines_generated) as 'Java Transform Generated Lines',\n SUM(inline_ai_code_lines) as 'Inline Suggestion Accepted Lines',\n SUM(inline_chat_accepted_line_additions) as 'In [...]
+ "rawSql": "SELECT CAST(date AS DATE) AS time, ROUND(SUM(credits_used), 1) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) ORDER BY time",
"refId": "A",
"select": [
[
@@ -240,12 +252,15 @@
]
}
],
- "title": "Daily AI Code Line Changes",
+ "title": "Daily Credits, Messages & Conversations",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily AI interaction trends across all users",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Chat events split into user turns and agent continuations.",
"fieldConfig": {
"defaults": {
"color": {
@@ -324,13 +339,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(chat_messages_sent) as 'Chat Messages Sent',\n SUM(code_fix_acceptance_event_count) as 'Code Fix Accepted Event Count',\n SUM(code_fix_generation_event_count) as 'Code Fix Generated Event Count',\n SUM(transformation_event_count) as 'Java Transform Event Count',\n SUM(inline_acceptance_count) as 'Inline Suggestion Accepted Suggestions',\n SUM(inline_suggestions_count) as 'Inline Suggestion Count',\n SUM(inline_chat_total_event_cou [...]
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS \"Chat Events\", SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS \"User Turns\", SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS \"Agent Continuations\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A",
"select": [
[
@@ -369,12 +387,15 @@
]
}
],
- "title": "Daily AI Interactions",
+ "title": "Daily Chat Activity",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Code review metrics over time",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Authoritative per-model and routing-mode message counts.",
"fieldConfig": {
"defaults": {
"color": {
@@ -453,12 +474,15 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(code_fix_acceptance_event_count) as 'Code Fix Accepted Event Count',\n SUM(code_fix_generation_event_count) as 'Code Fix Generated Event Count',\n SUM(code_review_findings_count) as 'Total Findings'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT CAST(date AS DATE) AS time, model_name AS metric, SUM(message_count) AS value FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE), model_name ORDER BY time",
"refId": "A",
"select": [
[
@@ -497,12 +521,15 @@
]
}
],
- "title": "Code Review Metrics",
+ "title": "Daily Model / Route Messages",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily acceptance rate of AI suggestions",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Agent continuations divided by all chat events. This is not suggestion acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -581,13 +608,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(code_fix_acceptance_event_count) / NULLIF(SUM(code_fix_generation_event_count), 0) as 'Code Fix',\n SUM(inline_acceptance_count) / NULLIF(SUM(inline_suggestions_count), 0) as 'Inline Suggestions',\n SUM(inline_chat_acceptance_event_count) / NULLIF(SUM(inline_chat_total_event_count), 0) as 'Inline Chat'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, CAST(SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS NUMERIC) * 100.0 / NULLIF(COUNT(*), 0) AS \"Agent Continuation Rate\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A",
"select": [
[
@@ -626,12 +656,15 @@
]
}
],
- "title": "Daily AI Suggestion Acceptance Rate",
+ "title": "Daily Agent Continuation Rate",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "User AI interaction metrics",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Per-user credits, messages, conversations, overage, and last activity.",
"fieldConfig": {
"defaults": {
"color": {
@@ -655,51 +688,7 @@
]
}
},
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Acceptance Rate"
- },
- "properties": [
- {
- "id": "unit",
- "value": "percentunit"
- },
- {
- "id": "custom.cellOptions",
- "value": {
- "mode": "gradient",
- "type": "gauge"
- }
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Inline Chat Accepted Events"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 239
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Acceptance Rate (Inline Suggestion)"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 172
- }
- ]
- }
- ]
+ "overrides": []
},
"gridPos": {
"h": 8,
@@ -724,13 +713,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n COALESCE(MAX(display_name), user_id) as 'User',\n SUM(chat_ai_code_lines) as 'Accepted Lines (Chat)',\n SUM(transformation_lines_ingested) as 'Lines Ingested (Java Transform)',\n SUM(transformation_lines_generated) as 'Lines Generated (Java Transform)',\n SUM(transformation_event_count) as 'Event Count (Java Transform)',\n SUM(code_review_findings_count) as 'Findings (Code Review)',\n SUM(code_fix_accepted_lines) as 'Accepted Lines (Code Fix)',\n SUM [...]
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", MAX(subscription_tier) AS \"Tier\", ROUND(SUM(credits_used), 1) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\", SUM(overage_credits_used) AS \"Overage Credits\", MAX(date) AS \"Last Activity\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY user_id ORDER BY SUM(credits_used) DESC",
"refId": "A",
"select": [
[
@@ -769,12 +761,15 @@
]
}
],
- "title": "User Interactions",
+ "title": "Per-User Usage",
"type": "table"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily doc generation events and accepted/rejected lines",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Messages by Kiro client type. Doc-generation metrics are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -853,13 +848,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(doc_generation_event_count) as 'Doc Generation Events',\n SUM(doc_generation_accepted_line_additions) as 'Accepted Line Additions',\n SUM(doc_generation_accepted_line_updates) as 'Accepted Line Updates',\n SUM(doc_generation_rejected_line_additions) as 'Rejected Line Additions',\n SUM(doc_generation_rejected_line_updates) as 'Rejected Line Updates'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT CAST(date AS DATE) AS time, client_type AS metric, SUM(total_messages) AS value FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE), client_type ORDER BY time",
"refId": "A",
"select": [
[
@@ -898,12 +896,15 @@
]
}
],
- "title": "Doc Generation Metrics",
+ "title": "Daily Client Type Messages",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily test generation events and lines",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Completion requests, requests with returned suggestions, and returned lines. These are not acceptance events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -982,13 +983,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(test_generation_event_count) as 'Test Generation Events',\n SUM(test_generation_accepted_tests) as 'Accepted Tests',\n SUM(test_generation_generated_tests) as 'Generated Tests',\n SUM(test_generation_accepted_lines) as 'Accepted Lines',\n SUM(test_generation_generated_lines) as 'Generated Lines'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS \"Completion Requests\", SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) AS \"Requests with Results\", SUM(returned_line_count) AS \"Returned Lines\" FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A",
"select": [
[
@@ -1027,12 +1031,15 @@
]
}
],
- "title": "Test Generation Metrics",
+ "title": "Daily Completion Activity",
"type": "timeseries"
},
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
- "description": "Daily agentic dev events and lines",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Steering, spec-mode, and agent-continuation events. Kiro does not export accepted agentic LOC.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1111,13 +1118,16 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "mysql", "uid": "devlake-mysql-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
- "rawSql": "SELECT\n date as time,\n SUM(dev_generation_event_count) as 'Dev Generation Events',\n SUM(dev_acceptance_event_count) as 'Dev Acceptance Events',\n SUM(dev_generated_lines) as 'Dev Generated Lines',\n SUM(dev_accepted_lines) as 'Dev Accepted Lines'\nFROM lake._tool_q_dev_user_data\nWHERE $__timeFilter(date)\nGROUP BY date\nORDER BY date",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, SUM(CASE WHEN has_steering = TRUE THEN 1 ELSE 0 END) AS \"Steering\", SUM(CASE WHEN is_spec_mode = TRUE THEN 1 ELSE 0 END) AS \"Spec Mode\", SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS \"Agent Continuations\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A",
"select": [
[
@@ -1156,7 +1166,7 @@
]
}
],
- "title": "Dev (Agentic) Metrics",
+ "title": "Daily Agentic Signals",
"type": "timeseries"
}
],
@@ -1164,7 +1174,7 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
+ "kiro",
"user_data"
],
"templating": {
@@ -1176,7 +1186,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Kiro Code Metrics Dashboard",
- "uid": "qdev_user_data",
+ "title": "Kiro Activity Detail Dashboard",
+ "uid": "kiro_user_data-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/qdev_executive.json b/grafana/dashboards/postgresql/kiro_executive.json
similarity index 71%
rename from grafana/dashboards/postgresql/qdev_executive.json
rename to grafana/dashboards/postgresql/kiro_executive.json
index 8ea7bbb8c..9a13ba801 100644
--- a/grafana/dashboards/postgresql/qdev_executive.json
+++ b/grafana/dashboards/postgresql/kiro_executive.json
@@ -27,7 +27,7 @@
"title": "Usage (New)",
"tooltip": "Kiro Usage Dashboard - Credits & Messages (new format)",
"type": "link",
- "url": "/d/qdev_user_report"
+ "url": "/d/kiro_user_report"
},
{
"asDropdown": false,
@@ -36,10 +36,10 @@
"keepTime": true,
"tags": [],
"targetBlank": true,
- "title": "Feature Metrics (Legacy)",
- "tooltip": "Kiro Legacy Feature Metrics (old format)",
+ "title": "Feature Metrics",
+ "tooltip": "Kiro Feature Metrics",
"type": "link",
- "url": "/d/qdev_feature_metrics"
+ "url": "/d/kiro_feature_metrics"
},
{
"asDropdown": false,
@@ -51,7 +51,7 @@
"title": "Prompt Logging",
"tooltip": "Kiro AI Activity Insights - Prompt Logging",
"type": "link",
- "url": "/d/qdev_logging"
+ "url": "/d/kiro_logging"
}
],
"panels": [
@@ -69,7 +69,10 @@
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Distinct users with chat activity in the last 7 days (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -116,11 +119,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"WAU\" FROM lake._tool_q_dev_chat_log WHERE timestamp >= NOW() - INTERVAL '7 DAY'",
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"WAU\" FROM lake._tool_kiro_chat_log WHERE timestamp >= NOW() - INTERVAL '7 DAY'",
"refId": "A"
}
],
@@ -128,8 +134,11 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Average credits spent per accepted line of code (new report + legacy metrics)",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Usage efficiency from Kiro reports. Accepted LOC is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -175,20 +184,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(r.credits_used) AS NUMERIC) / NULLIF(NULLIF(SUM(d.total_accepted), 0), 0), 2) AS \"Credits per Accepted Line\" FROM (SELECT user_id, date, SUM(credits_used) AS credits_used FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY \"user_id\", date) AS r JOIN (SELECT user_id, \"date\", (inline_ai_code_lines + chat_ai_code_lines + code_fix_accepted_lines + dev_accepted_lines) AS total_accepted FROM lake._tool_q_dev_user_data WHERE $__t [...]
+ "rawSql": "SELECT ROUND(CAST(SUM(credits_used) AS NUMERIC) / NULLIF(SUM(total_messages), 0), 2) AS \"Credits per Message\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Credits Efficiency (new + legacy)",
+ "title": "Credits per Message",
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Percentage of inline suggestions accepted (from legacy feature metrics)",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Share of chat events generated by agent self-continuation. Suggestion acceptance is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -234,19 +249,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) * 100, 1) AS \"Acceptance %\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date)",
+ "rawSql": "SELECT ROUND(CAST(SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS NUMERIC) * 100.0 / NULLIF(COUNT(*), 0), 1) AS \"Agent Continuation %\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
- "title": "Inline Acceptance Rate (legacy)",
+ "title": "Agent Continuation Rate",
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Percentage of users who used steering rules (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -294,11 +315,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT ROUND(CAST(CAST(COUNT(DISTINCT CASE WHEN has_steering = TRUE THEN user_id END) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT user_id), 0), 0) * 100 AS DECIMAL), 0) AS \"Steering %\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT ROUND(CAST(CAST(COUNT(DISTINCT CASE WHEN has_steering = TRUE THEN user_id END) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT user_id), 0), 0) * 100 AS DECIMAL), 0) AS \"Steering %\" FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
@@ -315,11 +339,14 @@
},
"id": 101,
"panels": [],
- "title": "User Engagement (logging data: _tool_q_dev_chat_log)",
+ "title": "User Engagement",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Weekly active user count over time (from prompt logging)",
"fieldConfig": {
"defaults": {
@@ -399,11 +426,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT TO_DATE(yw || ' Monday', 'IYYYIW FMDay') AS time, COUNT(DISTINCT user_id) AS \"Active Users\" FROM (SELECT user_id, (EXTRACT(ISOYEAR FROM timestamp) * 100 + EXTRACT(WEEK FROM timestamp))::int AS yw FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)) AS t GROUP BY \"yw\" ORDER BY time NULLS FIRST",
+ "rawSql": "SELECT TO_DATE(yw || ' Monday', 'IYYYIW FMDay') AS time, COUNT(DISTINCT user_id) AS \"Active Users\" FROM (SELECT user_id, (EXTRACT(ISOYEAR FROM timestamp) * 100 + EXTRACT(WEEK FROM timestamp))::int AS yw FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS t GROUP BY \"yw\" ORDER BY time NULLS FIRST",
"refId": "A"
}
],
@@ -411,8 +441,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "New vs returning users by week (from prompt logging)",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "New users use the native is_new_user flag; early rows without that field are reported as existing/unknown.",
"fieldConfig": {
"defaults": {
"color": {
@@ -491,15 +524,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT TO_DATE(yw || ' Monday', 'IYYYIW FMDay') AS time, SUM(CASE WHEN yw = first_yw THEN 1 ELSE 0 END) AS \"New Users\", SUM(CASE WHEN yw <> first_yw THEN 1 ELSE 0 END) AS \"Returning Users\" FROM (SELECT DISTINCT u.user_id, (EXTRACT(ISOYEAR FROM u.timestamp) * 100 + EXTRACT(WEEK FROM u.timestamp))::int AS yw, f.first_yw FROM lake._tool_q_dev_chat_log AS u JOIN (SELECT user_id, (EXTRACT(ISOYEAR FROM MIN(timestamp)) * 100 + EXTRACT(WEEK FROM MIN(timestamp)))::int AS [...]
+ "rawSql": "SELECT CAST(date AS DATE) - (EXTRACT(ISODOW FROM CAST(date AS DATE)) - 1) * INTERVAL '1 day' AS time, COUNT(DISTINCT CASE WHEN is_new_user IS TRUE THEN user_id END) AS \"New Users\", COUNT(DISTINCT CASE WHEN is_new_user IS NOT TRUE THEN user_id END) AS \"Existing/Unknown Users\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE) - (EXTRACT(ISODOW FROM CAST(date AS DATE)) - 1) * INTERVAL '1 day' ORDER BY time",
"refId": "A"
}
],
- "title": "New vs Returning Users (Weekly)",
+ "title": "New vs Existing/Unknown Users (Weekly)",
"type": "timeseries"
},
{
@@ -512,11 +548,14 @@
},
"id": 102,
"panels": [],
- "title": "Credits & Subscription (new format: _tool_q_dev_user_report)",
+ "title": "Credits & Subscription",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Cumulative credits this month vs projected total (from new user_report)",
"fieldConfig": {
"defaults": {
@@ -596,11 +635,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(SUM(credits_used)) OVER (ORDER BY date NULLS FIRST) AS \"Cumulative Credits\", (SELECT CAST(SUM(credits_used) AS NUMERIC) / NULLIF(COUNT(DISTINCT date), 0) * EXTRACT(DAY FROM CAST(CAST(DATE_TRUNC('MONTH', CURRENT_DATE) + INTERVAL '1 MONTH' - INTERVAL '1 DAY' AS DATE) AS DATE)) FROM lake._tool_q_dev_user_report WHERE YEAR(CAST(date AS DATE)) = YEAR(CAST(CURRENT_DATE AS DATE)) AND MONTH(CAST(date AS DATE)) = MONTH(CAST(CURRENT_DATE AS DATE))) A [...]
+ "rawSql": "SELECT date AS time, SUM(SUM(credits_used)) OVER (ORDER BY date NULLS FIRST) AS \"Cumulative Credits\", (SELECT CAST(SUM(credits_used) AS NUMERIC) / NULLIF(COUNT(DISTINCT date), 0) * EXTRACT(DAY FROM CAST(CAST(DATE_TRUNC('MONTH', CURRENT_DATE) + INTERVAL '1 MONTH' - INTERVAL '1 DAY' AS DATE) AS DATE)) FROM lake._tool_kiro_user_report WHERE YEAR(CAST(date AS DATE)) = YEAR(CAST(CURRENT_DATE AS DATE)) AND MONTH(CAST(date AS DATE)) = MONTH(CAST(CURRENT_DATE AS DATE))) AS [...]
"refId": "A"
}
],
@@ -608,7 +650,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Power tier users with no activity in the last 14 days (from new user_report)",
"fieldConfig": {
"defaults": {
@@ -658,11 +703,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", MAX(subscription_tier) AS \"Tier\", ROUND(SUM(credits_used), 1) AS \"Total Credits Used\", MAX(date) AS \"Last Activity\" FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date) AND subscription_tier = 'POWER' GROUP BY \"user_id\" HAVING MAX(date) < NOW() - INTERVAL '14 DAY' ORDER BY MAX(date) NULLS FIRST",
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", MAX(subscription_tier) AS \"Tier\", ROUND(SUM(credits_used), 1) AS \"Total Credits Used\", MAX(date) AS \"Last Activity\" FROM lake._tool_kiro_user_report WHERE $__timeFilter(date) AND subscription_tier = 'POWER' GROUP BY \"user_id\" HAVING MAX(date) < NOW() - INTERVAL '14 DAY' ORDER BY MAX(date) NULLS FIRST",
"refId": "A"
}
],
@@ -679,12 +727,15 @@
},
"id": 103,
"panels": [],
- "title": "Cross-Source: User Productivity (new report + legacy metrics)",
+ "title": "Per-User Usage & Efficiency",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Per-user productivity combining credits (new format) with feature metrics (legacy). Only shows users present in both data sources.",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Credits, messages, conversations, and credits per message. Accepted LOC is not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -733,15 +784,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(MAX(d.display_name), d.user_id) AS \"User\", COALESCE(MAX(r.subscription_tier), '') AS \"Tier\", ROUND(SUM(r.credits_used), 1) AS \"Credits Used\", SUM(d.chat_ai_code_lines + d.inline_ai_code_lines + d.code_fix_accepted_lines + d.dev_accepted_lines) AS \"Total Accepted Lines\", CASE WHEN SUM(d.chat_ai_code_lines + d.inline_ai_code_lines + d.code_fix_accepted_lines + d.dev_accepted_lines) > 0 THEN ROUND(CAST(SUM(r.credits_used) AS NUMERIC) / NULLIF(SUM [...]
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", MAX(subscription_tier) AS \"Tier\", ROUND(SUM(credits_used), 1) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\", ROUND(SUM(credits_used) / NULLIF(SUM(total_messages), 0), 3) AS \"Credits per Message\", MAX(date) AS \"Last Activity\" FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY user_id ORDER BY SUM(credits_used) DESC",
"refId": "A"
}
],
- "title": "User Productivity & Efficiency",
+ "title": "Per-User Usage & Efficiency",
"type": "table"
}
],
@@ -749,9 +803,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "executive",
- "kiro"
+ "kiro",
+ "executive"
],
"templating": {
"list": []
@@ -763,6 +816,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro Executive Dashboard",
- "uid": "qdev_executive-pg",
+ "uid": "kiro_executive-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/qdev_feature_metrics.json b/grafana/dashboards/postgresql/kiro_feature_metrics.json
similarity index 70%
rename from grafana/dashboards/postgresql/qdev_feature_metrics.json
rename to grafana/dashboards/postgresql/kiro_feature_metrics.json
index 3ea698aa5..ac8b3a487 100644
--- a/grafana/dashboards/postgresql/qdev_feature_metrics.json
+++ b/grafana/dashboards/postgresql/kiro_feature_metrics.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "High-level summary of legacy feature-level activity metrics (from by_user_analytic CSV reports)",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro usage-report metrics. Legacy accepted LOC and feature counters are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,15 +69,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Users\", SUM(inline_suggestions_count) AS \"Inline Suggestions\", SUM(inline_acceptance_count) AS \"Inline Accepted\", SUM(chat_messages_sent) AS \"Chat Messages\", SUM(chat_ai_code_lines) AS \"Chat AI Lines\", SUM(code_review_findings_count) AS \"Review Findings\", SUM(test_generation_event_count) AS \"Test Gen Events\", SUM(dev_accepted_lines) AS \"Agentic Lines\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date)",
+ "rawSql": "SELECT COUNT(DISTINCT user_id) AS \"Active Users\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\", ROUND(SUM(credits_used), 1) AS \"Credits Used\" FROM _tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
- "title": "Legacy Feature Metrics Overview",
+ "title": "Kiro Usage Overview",
"type": "stat"
},
{
@@ -87,12 +93,15 @@
},
"id": 20,
"panels": [],
- "title": "Inline Suggestions",
+ "title": "Completions",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily inline suggestion and acceptance counts",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Returned suggestions are offers, not acceptance events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -170,20 +179,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(inline_suggestions_count) AS \"Suggestions\", SUM(inline_acceptance_count) AS \"Accepted\", SUM(inline_ai_code_lines) AS \"AI Code Lines\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS \"Completion Requests\", SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) AS \"Requests with Results\", SUM(returned_line_count) AS \"Returned Lines\" FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Inline Suggestions & Acceptance",
+ "title": "Completion Requests & Results",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Acceptance rates for inline suggestions, code fix, and inline chat over time",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Percentage of completion requests that returned at least one suggestion. Kiro does not export acceptance.",
"fieldConfig": {
"defaults": {
"color": {
@@ -261,15 +276,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) AS \"Inline Suggestions\", CAST(SUM(code_fix_acceptance_event_count) AS NUMERIC) / NULLIF(NULLIF(SUM(code_fix_generation_event_count), 0), 0) AS \"Code Fix\", CAST(SUM(inline_chat_acceptance_event_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_chat_total_event_count), 0), 0) AS \"Inline Chat\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date [...]
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, CAST(SUM(CASE WHEN completions_count > 0 THEN 1 ELSE 0 END) AS NUMERIC) * 100.0 / NULLIF(COUNT(*), 0) AS \"Suggestion Return Rate\" FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Acceptance Rate Trends",
+ "title": "Suggestion Return Rate",
"type": "timeseries"
},
{
@@ -282,12 +300,15 @@
},
"id": 21,
"panels": [],
- "title": "Chat & Agentic (Dev)",
+ "title": "Chat & Agent Continuations",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily chat messages sent and AI-generated code lines from chat",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "User turns and agent self-continuations from chat logs.",
"fieldConfig": {
"defaults": {
"color": {
@@ -365,11 +386,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(chat_messages_sent) AS \"Messages Sent\", SUM(chat_messages_interacted) AS \"Messages Interacted\", SUM(chat_ai_code_lines) AS \"AI Code Lines\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS \"Chat Events\", SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS \"User Turns\", SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS \"Agent Continuations\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
@@ -377,8 +401,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Agentic (Dev) code generation and acceptance metrics",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Agent continuations are empty-prompt records after tool calls; this measures autonomy, not accepted code.",
"fieldConfig": {
"defaults": {
"color": {
@@ -456,15 +483,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(dev_generation_event_count) AS \"Generation Events\", SUM(dev_generated_lines) AS \"Generated Lines\", SUM(dev_accepted_lines) AS \"Accepted Lines\", SUM(dev_acceptance_event_count) AS \"Acceptance Events\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS \"User Turns\", SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS \"Agent Continuations\", CAST(SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS NUMERIC) * 100.0 / NULLIF(COUNT(*), 0) AS \"Agent Continuation Rate\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Agentic (Dev) Activity",
+ "title": "Agent Continuation Activity",
"type": "timeseries"
},
{
@@ -477,12 +507,15 @@
},
"id": 22,
"panels": [],
- "title": "Code Review, Test Gen & Transformations",
+ "title": "Models, Prompts & Clients",
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Code review findings and test generation metrics over time",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Authoritative model and routing-mode message counts from daily reports.",
"fieldConfig": {
"defaults": {
"color": {
@@ -560,20 +593,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(code_review_findings_count) AS \"Review Findings\", SUM(code_review_succeeded_event_count) AS \"Reviews Succeeded\", SUM(code_review_failed_event_count) AS \"Reviews Failed\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(date AS DATE) AS time, model_name AS metric, SUM(message_count) AS value FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE), model_name ORDER BY time",
"refId": "A"
}
],
- "title": "Code Review Activity",
+ "title": "Model / Route Message Mix",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Test generation events and acceptance over time",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Daily average prompt and response lengths. Test-generation counts are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -651,20 +690,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(test_generation_event_count) AS \"Test Gen Events\", SUM(test_generation_generated_tests) AS \"Tests Generated\", SUM(test_generation_accepted_tests) AS \"Tests Accepted\", SUM(test_generation_generated_lines) AS \"Lines Generated\", SUM(test_generation_accepted_lines) AS \"Lines Accepted\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, ROUND(AVG(prompt_length)) AS \"Avg Prompt Length\", ROUND(AVG(response_length)) AS \"Avg Response Length\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Test Generation Activity",
+ "title": "Prompt & Response Length",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Doc generation and code transformation events",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Messages by KIRO_IDE, KIRO_CLI, KIRO_WEB, and PLUGIN. Doc-generation metrics are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -742,20 +787,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(doc_generation_event_count) AS \"Doc Gen Events\", SUM(doc_generation_accepted_line_additions) AS \"Doc Lines Accepted\", SUM(transformation_event_count) AS \"Transformation Events\", SUM(transformation_lines_generated) AS \"Transform Lines Generated\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT CAST(date AS DATE) AS time, client_type AS metric, SUM(total_messages) AS value FROM _tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY CAST(date AS DATE), client_type ORDER BY time",
"refId": "A"
}
],
- "title": "Doc Generation & Transformations",
+ "title": "Client Type Message Mix",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Number of users who used each feature in the selected period",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Distinct users observed in chat, completion, steering, and spec-mode signals.",
"fieldConfig": {
"defaults": {
"color": {
@@ -838,11 +889,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT 'Chat' AS \"Feature\", COUNT(DISTINCT CASE WHEN chat_messages_sent > 0 THEN user_id END) AS \"Users\" FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) UNION ALL SELECT 'Inline Suggestions', COUNT(DISTINCT CASE WHEN inline_suggestions_count > 0 THEN user_id END) FROM lake._tool_q_dev_user_data WHERE $__timeFilter(date) UNION ALL SELECT 'Code Fix', COUNT(DISTINCT CASE WHEN code_fix_generation_event_count > 0 THEN user_id END) FROM lake._tool_q_dev_user_ [...]
+ "rawSql": "SELECT 'Chat' AS \"Feature\", COUNT(DISTINCT user_id) AS \"Users\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Completion' AS \"Feature\", COUNT(DISTINCT user_id) AS \"Users\" FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Steering' AS \"Feature\", COUNT(DISTINCT CASE WHEN has_steering = TRUE THEN user_id END) AS \"Users\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION ALL SELECT 'Spec Mode [...]
"refId": "A"
}
],
@@ -863,8 +917,11 @@
"type": "row"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Per-user breakdown of legacy feature-level metrics",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Per-user chat, completion, autonomy, steering, and spec-mode activity.",
"fieldConfig": {
"defaults": {
"color": {
@@ -913,15 +970,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", SUM(inline_suggestions_count) AS \"Suggestions\", SUM(inline_acceptance_count) AS \"Accepted\", ROUND(CAST(SUM(inline_acceptance_count) AS NUMERIC) / NULLIF(NULLIF(SUM(inline_suggestions_count), 0), 0) * 100, 1) || '%' AS \"Accept %\", SUM(chat_messages_sent) AS \"Chat Msgs\", SUM(chat_ai_code_lines) AS \"Chat Lines\", SUM(dev_accepted_lines) AS \"Agentic Lines\", SUM(code_review_findings_count) AS \"Review Fin [...]
+ "rawSql": "WITH users AS (SELECT user_id FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) UNION SELECT user_id FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp)), chat AS (SELECT user_id, COUNT(*) AS chat_events, SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS user_turns, SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS agent_continuations, SUM(CASE WHEN has_steering = TRUE THEN 1 ELSE 0 END) AS steering, SUM(CASE WHEN is_spec_mode = TRUE THEN 1 E [...]
"refId": "A"
}
],
- "title": "Per-User Feature Metrics",
+ "title": "Per-User Kiro Activity",
"type": "table"
}
],
@@ -929,8 +989,6 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "legacy",
"kiro"
],
"templating": {
@@ -942,7 +1000,7 @@
},
"timepicker": {},
"timezone": "utc",
- "title": "Kiro Legacy Feature Metrics",
- "uid": "qdev_feature_metrics-pg",
+ "title": "Kiro Feature Metrics",
+ "uid": "kiro_feature_metrics-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/qdev_logging.json b/grafana/dashboards/postgresql/kiro_logging.json
similarity index 72%
rename from grafana/dashboards/postgresql/qdev_logging.json
rename to grafana/dashboards/postgresql/kiro_logging.json
index 032b4fcfa..c0b4396cf 100644
--- a/grafana/dashboards/postgresql/qdev_logging.json
+++ b/grafana/dashboards/postgresql/kiro_logging.json
@@ -19,8 +19,11 @@
"links": [],
"panels": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Overview of logging event metrics",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Chat users, user turns, agent continuations, and completion events.",
"fieldConfig": {
"defaults": {
"color": {
@@ -66,11 +69,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT (SELECT COUNT(*) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)) AS \"Chat Events\", (SELECT COUNT(DISTINCT user_id) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)) AS \"Chat Users\", (SELECT COUNT(DISTINCT conversation_id) FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) AND conversation_id <> '') AS \"Conversations\", (SELECT COUNT(*) FROM lake._tool_q_dev_completion_log WHERE $__timeFilter(timestamp)) AS \"Completi [...]
+ "rawSql": "SELECT (SELECT COUNT(*) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS \"Chat Events\", (SELECT COUNT(DISTINCT user_id) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS \"Chat Users\", (SELECT SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS \"User Turns\", (SELECT SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)) AS \"Agent [...]
"refId": "A"
}
],
@@ -78,7 +84,10 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Hourly distribution of AI usage activity (chat + completions)",
"fieldConfig": {
"defaults": {
@@ -155,11 +164,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT LPAD(CAST(hour_of_day AS TEXT), 2, '0') AS \"Hour\", SUM(chat_count) AS \"Chat Events\", SUM(completion_count) AS \"Completion Events\" FROM (SELECT EXTRACT(HOUR FROM timestamp) AS hour_of_day, COUNT(*) AS chat_count, 0 AS completion_count FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY EXTRACT(HOUR FROM timestamp) UNION ALL SELECT EXTRACT(HOUR FROM timestamp) AS hour_of_day, 0 AS chat_count, COUNT(*) AS completion_count FROM lake._tool_ [...]
+ "rawSql": "SELECT LPAD(CAST(hour_of_day AS TEXT), 2, '0') AS \"Hour\", SUM(chat_count) AS \"Chat Events\", SUM(completion_count) AS \"Completion Events\" FROM (SELECT EXTRACT(HOUR FROM timestamp) AS hour_of_day, COUNT(*) AS chat_count, 0 AS completion_count FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY EXTRACT(HOUR FROM timestamp) UNION ALL SELECT EXTRACT(HOUR FROM timestamp) AS hour_of_day, 0 AS chat_count, COUNT(*) AS completion_count FROM lake._tool_k [...]
"refId": "A"
}
],
@@ -167,7 +179,10 @@
"type": "barchart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Distribution of chat trigger types: MANUAL (chat window) vs INLINE_CHAT",
"fieldConfig": {
"defaults": {
@@ -223,11 +238,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT CASE WHEN chat_trigger_type = '' OR chat_trigger_type IS NULL THEN '(unknown)' ELSE chat_trigger_type END AS \"Trigger Type\", COUNT(*) AS \"Events\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY \"chat_trigger_type\" ORDER BY COUNT(*) DESC NULLS LAST",
+ "rawSql": "SELECT CASE WHEN chat_trigger_type = '' OR chat_trigger_type IS NULL THEN '(unknown)' ELSE chat_trigger_type END AS \"Trigger Type\", COUNT(*) AS \"Events\" FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY \"chat_trigger_type\" ORDER BY COUNT(*) DESC NULLS LAST",
"refId": "A"
}
],
@@ -235,8 +253,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Distribution of model usage across chat events",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Authoritative model and routing-mode counts from daily reports; chat model_id is only partially populated.",
"fieldConfig": {
"defaults": {
"color": {
@@ -280,7 +301,7 @@
"calcs": [
"lastNotNull"
],
- "fields": "/^Requests$/",
+ "fields": "/^Messages$/",
"values": true
},
"tooltip": {
@@ -291,19 +312,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT CASE WHEN model_id = '' OR model_id IS NULL THEN '(unknown)' ELSE model_id END AS \"Model\", COUNT(*) AS \"Requests\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY \"model_id\" ORDER BY COUNT(*) DESC NULLS LAST",
+ "rawSql": "SELECT model_name AS \"Model / Route\", SUM(message_count) AS \"Messages\" FROM _tool_kiro_user_model_messages WHERE $__timeFilter(date) GROUP BY model_name ORDER BY SUM(message_count) DESC",
"refId": "A"
}
],
- "title": "Model Usage Distribution",
+ "title": "Model / Route Message Distribution",
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Top file extensions used with inline completions",
"fieldConfig": {
"defaults": {
@@ -359,11 +386,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS \"File Type\", COUNT(*) AS \"Completions\" FROM lake._tool_q_dev_completion_log WHERE $__timeFilter(timestamp) GROUP BY \"file_extension\" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 15",
+ "rawSql": "SELECT CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS \"File Type\", COUNT(*) AS \"Completions\" FROM lake._tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY \"file_extension\" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 15",
"refId": "A"
}
],
@@ -371,8 +401,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Average number of chat events per conversation",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Conversation IDs are absent in sampled Kiro logs, so conversation depth cannot be computed.",
"fieldConfig": {
"defaults": {
"color": {
@@ -451,19 +484,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(timestamp AS DATE) AS time, CAST(COUNT(*) AS NUMERIC) / NULLIF(NULLIF(COUNT(DISTINCT CASE WHEN conversation_id <> '' THEN conversation_id END), 0), 0) AS \"Avg Turns per Conversation\", COUNT(DISTINCT CASE WHEN conversation_id <> '' THEN conversation_id END) AS \"Unique Conversations\", COUNT(*) AS \"Total Chat Events\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS \"User Turns\", SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS \"Agent Continuations\", CAST(SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS NUMERIC) * 100.0 / NULLIF(COUNT(*), 0) AS \"Agent Continuation Rate\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Conversation Depth Analysis",
+ "title": "User Turns vs Agent Continuations",
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Daily chat and completion events over time",
"fieldConfig": {
"defaults": {
@@ -543,11 +582,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT time, SUM(chat) AS \"Chat Events\", SUM(completions) AS \"Completion Events\" FROM (SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS chat, 0 AS completions FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) UNION ALL SELECT CAST(timestamp AS DATE) AS time, 0 AS chat, COUNT(*) AS completions FROM lake._tool_q_dev_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE)) AS combined GROUP BY ti [...]
+ "rawSql": "SELECT time, SUM(chat) AS \"Chat Events\", SUM(completions) AS \"Completion Events\" FROM (SELECT CAST(timestamp AS DATE) AS time, COUNT(*) AS chat, 0 AS completions FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) UNION ALL SELECT CAST(timestamp AS DATE) AS time, 0 AS chat, COUNT(*) AS completions FROM lake._tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE)) AS combined GROUP BY time [...]
"refId": "A"
}
],
@@ -555,8 +597,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Per-user logging activity summary",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Per-user chat and completion activity with display names resolved from usage reports.",
"fieldConfig": {
"defaults": {
"color": {
@@ -605,11 +650,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(u.display_name, u.user_id) AS \"User\", u.user_id AS \"User ID\", u.chat_events AS \"Chat Events\", u.conversations AS \"Conversations\", ROUND(CAST(u.chat_events AS NUMERIC) / NULLIF(NULLIF(u.conversations, 0), 0), 1) AS \"Avg Turns\", COALESCE(c.completion_events, 0) AS \"Completion Events\", COALESCE(c.files_count, 0) AS \"Distinct Files\", ROUND(u.avg_prompt_len) AS \"Avg Prompt Len\", ROUND(u.avg_response_len) AS \"Avg Response Len\", u.steering_ [...]
+ "rawSql": "WITH chat AS (SELECT user_id, COUNT(*) AS chat_events, SUM(CASE WHEN has_prompt = TRUE THEN 1 ELSE 0 END) AS user_turns, SUM(CASE WHEN has_prompt = FALSE THEN 1 ELSE 0 END) AS agent_continuations FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY user_id), completion AS (SELECT user_id, COUNT(*) AS completion_events, SUM(returned_line_count) AS returned_lines FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY user_id), names AS (SELE [...]
"refId": "A"
}
],
@@ -617,7 +665,10 @@
"type": "table"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Distribution of Kiro feature adoption: Steering, Spec Mode, and Plain Chat",
"fieldConfig": {
"defaults": {
@@ -673,11 +724,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT SUM(CASE WHEN has_steering = TRUE THEN 1 ELSE 0 END) AS \"Using Steering\", SUM(CASE WHEN is_spec_mode = TRUE THEN 1 ELSE 0 END) AS \"Using Spec Mode\", SUM(CASE WHEN has_steering = FALSE AND is_spec_mode = FALSE THEN 1 ELSE 0 END) AS \"Plain Chat\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT SUM(CASE WHEN has_steering = TRUE THEN 1 ELSE 0 END) AS \"Using Steering\", SUM(CASE WHEN is_spec_mode = TRUE THEN 1 ELSE 0 END) AS \"Using Spec Mode\", SUM(CASE WHEN has_steering = FALSE AND is_spec_mode = FALSE THEN 1 ELSE 0 END) AS \"Plain Chat\" FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
@@ -685,8 +739,11 @@
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Top file extensions active during chat events",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Chat logs do not contain active file extensions; completion logs provide file types and returned lines.",
"fieldConfig": {
"defaults": {
"color": {
@@ -741,20 +798,26 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT CASE WHEN active_file_extension = '' OR active_file_extension IS NULL THEN '(no file active)' ELSE active_file_extension END AS \"File Type\", COUNT(*) AS \"Chat Events\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY \"active_file_extension\" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 15",
+ "rawSql": "SELECT CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS \"File Type\", SUM(returned_line_count) AS \"Returned Lines\" FROM _tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY file_extension ORDER BY SUM(returned_line_count) DESC",
"refId": "A"
}
],
- "title": "Active File Types in Chat",
+ "title": "Returned Lines by File Type",
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "How often Kiro responses include code references and web links",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Kiro logs expose follow-up prompts but not code-reference or web-link counters.",
"fieldConfig": {
"defaults": {
"color": {
@@ -809,19 +872,25 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT SUM(CASE WHEN code_reference_count > 0 THEN 1 ELSE 0 END) AS \"With Code References\", SUM(CASE WHEN web_link_count > 0 THEN 1 ELSE 0 END) AS \"With Web Links\", SUM(CASE WHEN has_followup_prompts = TRUE THEN 1 ELSE 0 END) AS \"With Followup Prompts\", SUM(CASE WHEN code_reference_count = '0' AND web_link_count = '0' AND has_followup_prompts = FALSE THEN 1 ELSE 0 END) AS \"Plain Response\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp)",
+ "rawSql": "SELECT SUM(CASE WHEN has_followup_prompts = TRUE THEN 1 ELSE 0 END) AS \"With Follow-up Prompts\", SUM(CASE WHEN has_followup_prompts = FALSE THEN 1 ELSE 0 END) AS \"Without Follow-up Prompts\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp)",
"refId": "A"
}
],
- "title": "Response Enrichment Breakdown",
+ "title": "Follow-up Prompt Breakdown",
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Average and maximum prompt/response lengths over time",
"fieldConfig": {
"defaults": {
@@ -901,11 +970,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(timestamp AS DATE) AS time, AVG(prompt_length) AS \"Avg Prompt Length\", AVG(response_length) AS \"Avg Response Length\", MAX(prompt_length) AS \"Max Prompt Length\", MAX(response_length) AS \"Max Response Length\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, AVG(prompt_length) AS \"Avg Prompt Length\", AVG(response_length) AS \"Avg Response Length\", MAX(prompt_length) AS \"Max Prompt Length\", MAX(response_length) AS \"Max Response Length\" FROM lake._tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
"refId": "A"
}
],
@@ -913,7 +985,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Average code context size provided to inline completions over time",
"fieldConfig": {
"defaults": {
@@ -992,11 +1067,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(timestamp AS DATE) AS time, ROUND(AVG(left_context_length)) AS \"Avg Left Context\", ROUND(AVG(right_context_length)) AS \"Avg Right Context\", ROUND(AVG(left_context_length + right_context_length)) AS \"Avg Total Context\" FROM lake._tool_q_dev_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, ROUND(AVG(left_context_length)) AS \"Avg Left Context\", ROUND(AVG(right_context_length)) AS \"Avg Right Context\", ROUND(AVG(left_context_length + right_context_length)) AS \"Avg Total Context\" FROM lake._tool_kiro_completion_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
"refId": "A"
}
],
@@ -1004,8 +1082,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily trend of code references and web links in chat responses",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Daily responses with and without follow-up prompts. Code-reference and web-link counters are not exported.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1083,15 +1164,18 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT CAST(timestamp AS DATE) AS time, SUM(code_reference_count) AS \"Code References\", SUM(web_link_count) AS \"Web Links\", SUM(CASE WHEN has_followup_prompts = TRUE THEN 1 ELSE 0 END) AS \"Followup Prompts\" FROM lake._tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY CAST(timestamp AS DATE) NULLS FIRST",
+ "rawSql": "SELECT CAST(timestamp AS DATE) AS time, SUM(CASE WHEN has_followup_prompts = TRUE THEN 1 ELSE 0 END) AS \"With Follow-up Prompts\", SUM(CASE WHEN has_followup_prompts = FALSE THEN 1 ELSE 0 END) AS \"Without Follow-up Prompts\" FROM _tool_kiro_chat_log WHERE $__timeFilter(timestamp) GROUP BY CAST(timestamp AS DATE) ORDER BY time",
"refId": "A"
}
],
- "title": "Response Enrichment Trends",
+ "title": "Follow-up Prompt Trends",
"type": "timeseries"
}
],
@@ -1099,9 +1183,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "logging",
- "kiro"
+ "kiro",
+ "logging"
],
"templating": {
"list": []
@@ -1113,6 +1196,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro AI Activity Insights",
- "uid": "qdev_logging-pg",
+ "uid": "kiro_logging-pg",
"version": 1
-}
\ No newline at end of file
+}
diff --git a/grafana/dashboards/postgresql/qdev_user_report.json b/grafana/dashboards/postgresql/kiro_user_report.json
similarity index 82%
rename from grafana/dashboards/postgresql/qdev_user_report.json
rename to grafana/dashboards/postgresql/kiro_user_report.json
index 592d8a75d..4f720f1aa 100644
--- a/grafana/dashboards/postgresql/qdev_user_report.json
+++ b/grafana/dashboards/postgresql/kiro_user_report.json
@@ -19,7 +19,10 @@
"links": [],
"panels": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Overview of credits and usage metrics",
"fieldConfig": {
"defaults": {
@@ -66,11 +69,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT SUM(credits_used) AS \"Total Credits Used\", COUNT(DISTINCT user_id) AS \"Active Users\", SUM(total_messages) AS \"Total Messages\", SUM(chat_conversations) AS \"Total Conversations\" FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date)",
+ "rawSql": "SELECT SUM(credits_used) AS \"Total Credits Used\", COUNT(DISTINCT user_id) AS \"Active Users\", SUM(total_messages) AS \"Total Messages\", SUM(chat_conversations) AS \"Total Conversations\" FROM lake._tool_kiro_user_report WHERE $__timeFilter(date)",
"refId": "A"
}
],
@@ -78,7 +84,10 @@
"type": "stat"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Daily credits consumed broken down by subscription tier",
"fieldConfig": {
"defaults": {
@@ -158,11 +167,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, subscription_tier AS metric, SUM(credits_used) AS value FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY \"date\", \"subscription_tier\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT date AS time, subscription_tier AS metric, SUM(credits_used) AS value FROM lake._tool_kiro_user_report WHERE $__timeFilter(date) GROUP BY \"date\", \"subscription_tier\" ORDER BY date NULLS FIRST",
"refId": "A"
}
],
@@ -170,8 +182,11 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
- "description": "Daily messages and conversations broken down by client type",
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
+ "description": "Daily messages by Kiro IDE, CLI, Web, and Plugin clients, plus conversations.",
"fieldConfig": {
"defaults": {
"color": {
@@ -250,11 +265,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "time_series",
"rawQuery": true,
- "rawSql": "SELECT date AS time, SUM(CASE WHEN client_type = 'KIRO_IDE' THEN total_messages ELSE 0 END) AS \"Messages (IDE)\", SUM(CASE WHEN client_type = 'KIRO_CLI' THEN total_messages ELSE 0 END) AS \"Messages (CLI)\", SUM(CASE WHEN client_type = 'PLUGIN' THEN total_messages ELSE 0 END) AS \"Messages (Plugin)\", SUM(chat_conversations) AS \"Conversations\" FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date) GROUP BY \"date\" ORDER BY date NULLS FIRST",
+ "rawSql": "SELECT date AS time, SUM(CASE WHEN client_type = 'KIRO_IDE' THEN total_messages ELSE 0 END) AS \"Messages (IDE)\", SUM(CASE WHEN client_type = 'KIRO_CLI' THEN total_messages ELSE 0 END) AS \"Messages (CLI)\", SUM(CASE WHEN client_type = 'KIRO_WEB' THEN total_messages ELSE 0 END) AS \"Messages (Web)\", SUM(CASE WHEN client_type = 'PLUGIN' THEN total_messages ELSE 0 END) AS \"Messages (Plugin)\", SUM(chat_conversations) AS \"Conversations\" FROM _tool_kiro_user_report [...]
"refId": "A"
}
],
@@ -262,7 +280,10 @@
"type": "timeseries"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Distribution of users across subscription tiers",
"fieldConfig": {
"defaults": {
@@ -318,11 +339,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT subscription_tier AS \"Tier\", COUNT(DISTINCT user_id) AS \"Users\" FROM lake._tool_q_dev_user_report WHERE $__timeFilter(date) AND NOT subscription_tier IS NULL AND subscription_tier <> '' GROUP BY \"subscription_tier\" ORDER BY COUNT(DISTINCT user_id) DESC NULLS LAST",
+ "rawSql": "SELECT subscription_tier AS \"Tier\", COUNT(DISTINCT user_id) AS \"Users\" FROM lake._tool_kiro_user_report WHERE $__timeFilter(date) AND NOT subscription_tier IS NULL AND subscription_tier <> '' GROUP BY \"subscription_tier\" ORDER BY COUNT(DISTINCT user_id) DESC NULLS LAST",
"refId": "A"
}
],
@@ -330,7 +354,10 @@
"type": "piechart"
},
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"description": "Per-user credits, messages, and subscription details",
"fieldConfig": {
"defaults": {
@@ -429,11 +456,14 @@
"pluginVersion": "13.0.2",
"targets": [
{
- "datasource": {"type": "grafana-postgresql-datasource", "uid": "devlake-postgres-api"},
+ "datasource": {
+ "type": "grafana-postgresql-datasource",
+ "uid": "devlake-postgres-api"
+ },
"editorMode": "code",
"format": "table",
"rawQuery": true,
- "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", subscription_tier AS \"Tier\", client_type AS \"Client\", SUM(credits_used) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\", SUM(overage_credits_used) AS \"Overage Credits\", CASE WHEN MAX(CAST(overage_enabled AS BIGINT)) = 1 THEN 'Yes' ELSE 'No' END AS \"Overage\", MIN(date) AS \"First Activity\", MAX(date) AS \"Last Activity\" FROM lake._tool_q_dev_user_r [...]
+ "rawSql": "SELECT COALESCE(MAX(display_name), user_id) AS \"User\", subscription_tier AS \"Tier\", client_type AS \"Client\", SUM(credits_used) AS \"Credits Used\", SUM(total_messages) AS \"Messages\", SUM(chat_conversations) AS \"Conversations\", SUM(overage_credits_used) AS \"Overage Credits\", CASE WHEN MAX(CAST(overage_enabled AS BIGINT)) = 1 THEN 'Yes' ELSE 'No' END AS \"Overage\", MIN(date) AS \"First Activity\", MAX(date) AS \"Last Activity\" FROM lake._tool_kiro_user_re [...]
"refId": "A"
}
],
@@ -445,9 +475,8 @@
"refresh": "5m",
"schemaVersion": 41,
"tags": [
- "q_dev",
- "user_report",
- "kiro"
+ "kiro",
+ "user_report"
],
"templating": {
"list": []
@@ -459,6 +488,6 @@
"timepicker": {},
"timezone": "utc",
"title": "Kiro Usage Dashboard",
- "uid": "qdev_user_report-pg",
+ "uid": "kiro_user_report-pg",
"version": 1
-}
\ No newline at end of file
+}