|
| 1 | +{ |
| 2 | + "annotations": { |
| 3 | + "list": [ |
| 4 | + { |
| 5 | + "builtIn": 1, |
| 6 | + "datasource": "-- Grafana --", |
| 7 | + "enable": true, |
| 8 | + "hide": true, |
| 9 | + "iconColor": "rgba(0, 211, 255, 1)", |
| 10 | + "name": "Annotations & Alerts", |
| 11 | + "type": "dashboard" |
| 12 | + } |
| 13 | + ] |
| 14 | + }, |
| 15 | + "editable": true, |
| 16 | + "fiscalYearStartMonth": 0, |
| 17 | + "graphTooltip": 1, |
| 18 | + "id": null, |
| 19 | + "links": [], |
| 20 | + "panels": [ |
| 21 | + { |
| 22 | + "datasource": "mysql", |
| 23 | + "description": "Completion requests, avg context size, and completion rate per language", |
| 24 | + "fieldConfig": { |
| 25 | + "defaults": { |
| 26 | + "color": { "mode": "thresholds" }, |
| 27 | + "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "filterable": true }, |
| 28 | + "thresholds": { "mode": "absolute", "steps": [{ "color": "green" }] } |
| 29 | + }, |
| 30 | + "overrides": [] |
| 31 | + }, |
| 32 | + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 0 }, |
| 33 | + "id": 1, |
| 34 | + "options": { "cellHeight": "sm", "showHeader": true, "sortBy": [{ "desc": true, "displayName": "Requests" }] }, |
| 35 | + "targets": [ |
| 36 | + { |
| 37 | + "datasource": "mysql", |
| 38 | + "format": "table", |
| 39 | + "rawQuery": true, |
| 40 | + "rawSql": "SELECT\n CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS 'Language',\n COUNT(*) AS 'Requests',\n ROUND(AVG(completions_count), 2) AS 'Avg Completions',\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',\n COUNT(DISTINCT user_id) AS 'Users'\nFROM _tool_q_dev_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY file_extension\nORDER BY COUNT(*) DESC", |
| 41 | + "refId": "A" |
| 42 | + } |
| 43 | + ], |
| 44 | + "title": "Language Completion Profile", |
| 45 | + "type": "table" |
| 46 | + }, |
| 47 | + { |
| 48 | + "datasource": "mysql", |
| 49 | + "description": "Daily completion requests by language", |
| 50 | + "fieldConfig": { |
| 51 | + "defaults": { |
| 52 | + "color": { "mode": "palette-classic" }, |
| 53 | + "custom": { |
| 54 | + "drawStyle": "bars", "fillOpacity": 80, "lineWidth": 1, |
| 55 | + "stacking": { "mode": "normal" }, "thresholdsStyle": { "mode": "off" } |
| 56 | + }, |
| 57 | + "unit": "short" |
| 58 | + }, |
| 59 | + "overrides": [] |
| 60 | + }, |
| 61 | + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 9 }, |
| 62 | + "id": 2, |
| 63 | + "options": { |
| 64 | + "legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true }, |
| 65 | + "tooltip": { "mode": "multi" } |
| 66 | + }, |
| 67 | + "targets": [ |
| 68 | + { |
| 69 | + "datasource": "mysql", |
| 70 | + "format": "time_series", |
| 71 | + "rawQuery": true, |
| 72 | + "rawSql": "SELECT DATE(timestamp) AS time,\n CASE WHEN file_extension = '' THEN '(unknown)' ELSE file_extension END AS metric,\n COUNT(*) AS value\nFROM _tool_q_dev_completion_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp), file_extension\nORDER BY time", |
| 73 | + "refId": "A" |
| 74 | + } |
| 75 | + ], |
| 76 | + "title": "Daily Completions by Language", |
| 77 | + "type": "timeseries" |
| 78 | + }, |
| 79 | + { |
| 80 | + "datasource": "mysql", |
| 81 | + "description": "Which file types are most active during chat sessions", |
| 82 | + "fieldConfig": { |
| 83 | + "defaults": { |
| 84 | + "color": { "mode": "palette-classic" }, |
| 85 | + "mappings": [], |
| 86 | + "thresholds": { "mode": "absolute", "steps": [{ "color": "green" }] } |
| 87 | + }, |
| 88 | + "overrides": [] |
| 89 | + }, |
| 90 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 17 }, |
| 91 | + "id": 3, |
| 92 | + "options": { |
| 93 | + "displayLabels": ["name", "percent"], |
| 94 | + "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": ["value", "percent"] }, |
| 95 | + "pieType": "donut", |
| 96 | + "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": true }, |
| 97 | + "tooltip": { "mode": "single" } |
| 98 | + }, |
| 99 | + "targets": [ |
| 100 | + { |
| 101 | + "datasource": "mysql", |
| 102 | + "format": "table", |
| 103 | + "rawQuery": true, |
| 104 | + "rawSql": "SELECT\n CASE WHEN active_file_extension = '' OR active_file_extension IS NULL THEN '(no file)' ELSE active_file_extension END AS 'File Type',\n COUNT(*) AS 'Chat Events'\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY active_file_extension\nORDER BY COUNT(*) DESC\nLIMIT 10", |
| 105 | + "refId": "A" |
| 106 | + } |
| 107 | + ], |
| 108 | + "title": "Active File Types During Chat", |
| 109 | + "type": "piechart" |
| 110 | + }, |
| 111 | + { |
| 112 | + "datasource": "mysql", |
| 113 | + "description": "Context size trends for top languages", |
| 114 | + "fieldConfig": { |
| 115 | + "defaults": { |
| 116 | + "color": { "mode": "palette-classic" }, |
| 117 | + "custom": { |
| 118 | + "drawStyle": "line", "fillOpacity": 10, "lineInterpolation": "smooth", "lineWidth": 2, |
| 119 | + "showPoints": "never", "spanNulls": true, |
| 120 | + "stacking": { "mode": "none" }, "thresholdsStyle": { "mode": "off" } |
| 121 | + }, |
| 122 | + "unit": "short" |
| 123 | + }, |
| 124 | + "overrides": [] |
| 125 | + }, |
| 126 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 17 }, |
| 127 | + "id": 4, |
| 128 | + "options": { |
| 129 | + "legend": { "calcs": ["mean"], "displayMode": "table", "placement": "right", "showLegend": true }, |
| 130 | + "tooltip": { "mode": "multi" } |
| 131 | + }, |
| 132 | + "targets": [ |
| 133 | + { |
| 134 | + "datasource": "mysql", |
| 135 | + "format": "time_series", |
| 136 | + "rawQuery": true, |
| 137 | + "rawSql": "SELECT DATE(timestamp) AS time,\n file_extension AS metric,\n ROUND(AVG(left_context_length + right_context_length)) AS value\nFROM _tool_q_dev_completion_log\nWHERE $__timeFilter(timestamp)\n AND file_extension IN (SELECT file_extension FROM _tool_q_dev_completion_log GROUP BY file_extension ORDER BY COUNT(*) DESC LIMIT 5)\nGROUP BY DATE(timestamp), file_extension\nORDER BY time", |
| 138 | + "refId": "A" |
| 139 | + } |
| 140 | + ], |
| 141 | + "title": "Avg Context Size by Language (Top 5)", |
| 142 | + "type": "timeseries" |
| 143 | + } |
| 144 | + ], |
| 145 | + "preload": false, |
| 146 | + "refresh": "5m", |
| 147 | + "schemaVersion": 41, |
| 148 | + "tags": ["q_dev", "kiro", "language", "completions"], |
| 149 | + "templating": { "list": [] }, |
| 150 | + "time": { "from": "now-90d", "to": "now" }, |
| 151 | + "timepicker": {}, |
| 152 | + "timezone": "utc", |
| 153 | + "title": "Kiro Language AI Heatmap", |
| 154 | + "uid": "kiro_language_heatmap", |
| 155 | + "version": 1 |
| 156 | +} |
0 commit comments