|
| 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": "Requests, avg prompt/response length, and usage share per model", |
| 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": 8, "w": 24, "x": 0, "y": 0 }, |
| 33 | + "id": 1, |
| 34 | + "options": { "cellHeight": "sm", "showHeader": true, "sortBy": [] }, |
| 35 | + "targets": [ |
| 36 | + { |
| 37 | + "datasource": "mysql", |
| 38 | + "format": "table", |
| 39 | + "rawQuery": true, |
| 40 | + "rawSql": "SELECT\n CASE WHEN model_id = '' OR model_id IS NULL THEN '(unknown)' ELSE model_id END AS 'Model',\n COUNT(*) AS 'Requests',\n ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM _tool_q_dev_chat_log WHERE $__timeFilter(timestamp)), 1) AS 'Share %',\n ROUND(AVG(prompt_length)) AS 'Avg Prompt Len',\n ROUND(AVG(response_length)) AS 'Avg Response Len',\n ROUND(AVG(response_length) / NULLIF(AVG(prompt_length), 0), 2) AS 'Response/Prompt Ratio',\n SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) AS 'Steering Uses',\n SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) AS 'Spec Mode Uses'\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY model_id\nORDER BY COUNT(*) DESC", |
| 41 | + "refId": "A" |
| 42 | + } |
| 43 | + ], |
| 44 | + "title": "Model Performance Summary", |
| 45 | + "type": "table" |
| 46 | + }, |
| 47 | + { |
| 48 | + "datasource": "mysql", |
| 49 | + "description": "Request volume by model over time", |
| 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": 8 }, |
| 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 model_id = '' OR model_id IS NULL THEN '(unknown)' ELSE model_id END AS metric,\n COUNT(*) AS value\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp), model_id\nORDER BY time", |
| 73 | + "refId": "A" |
| 74 | + } |
| 75 | + ], |
| 76 | + "title": "Daily Model Usage Distribution", |
| 77 | + "type": "timeseries" |
| 78 | + }, |
| 79 | + { |
| 80 | + "datasource": "mysql", |
| 81 | + "description": "Average response length per model over time — proxy for output quality", |
| 82 | + "fieldConfig": { |
| 83 | + "defaults": { |
| 84 | + "color": { "mode": "palette-classic" }, |
| 85 | + "custom": { |
| 86 | + "drawStyle": "line", "fillOpacity": 10, "lineInterpolation": "smooth", "lineWidth": 2, |
| 87 | + "showPoints": "never", "spanNulls": true, |
| 88 | + "stacking": { "mode": "none" }, "thresholdsStyle": { "mode": "off" } |
| 89 | + }, |
| 90 | + "unit": "short" |
| 91 | + }, |
| 92 | + "overrides": [] |
| 93 | + }, |
| 94 | + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 }, |
| 95 | + "id": 3, |
| 96 | + "options": { |
| 97 | + "legend": { "calcs": ["mean"], "displayMode": "table", "placement": "right", "showLegend": true }, |
| 98 | + "tooltip": { "mode": "multi" } |
| 99 | + }, |
| 100 | + "targets": [ |
| 101 | + { |
| 102 | + "datasource": "mysql", |
| 103 | + "format": "time_series", |
| 104 | + "rawQuery": true, |
| 105 | + "rawSql": "SELECT DATE(timestamp) AS time,\n CASE WHEN model_id = '' OR model_id IS NULL THEN '(unknown)' ELSE model_id END AS metric,\n ROUND(AVG(response_length)) AS value\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY DATE(timestamp), model_id\nORDER BY time", |
| 106 | + "refId": "A" |
| 107 | + } |
| 108 | + ], |
| 109 | + "title": "Avg Response Length by Model (Daily)", |
| 110 | + "type": "timeseries" |
| 111 | + } |
| 112 | + ], |
| 113 | + "preload": false, |
| 114 | + "refresh": "5m", |
| 115 | + "schemaVersion": 41, |
| 116 | + "tags": ["q_dev", "kiro", "model", "roi"], |
| 117 | + "templating": { "list": [] }, |
| 118 | + "time": { "from": "now-90d", "to": "now" }, |
| 119 | + "timepicker": {}, |
| 120 | + "timezone": "utc", |
| 121 | + "title": "Kiro AI Model ROI", |
| 122 | + "uid": "kiro_model_roi", |
| 123 | + "version": 1 |
| 124 | +} |
0 commit comments