|
233 | 233 | }, |
234 | 234 | { |
235 | 235 | "datasource": "mysql", |
236 | | - "description": "Difference between /teams/spend total and sum of chargedCents for events since billing_cycle_start. Positive means spend exceeds collected events (backfill may be incomplete).", |
| 236 | + "description": "Difference between total cycle spend (on-demand + included) from /teams/spend and sum of chargedCents for events since billing_cycle_start. Positive means spend exceeds collected events (backfill may be incomplete).", |
237 | 237 | "fieldConfig": { |
238 | 238 | "defaults": { |
239 | 239 | "decimals": 2, |
|
259 | 259 | "datasource": "mysql", |
260 | 260 | "format": "table", |
261 | 261 | "rawQuery": true, |
262 | | - "rawSql": "SELECT (\n COALESCE((SELECT SUM(spend_cents) FROM _tool_cursor_user_spend\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}'), 0)\n - COALESCE((SELECT SUM(charged_cents) FROM _tool_cursor_usage_events\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}'\n AND event_time >= (SELECT MIN(billing_cycle_start) FROM _tool_cursor_user_spend\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}')), 0)\n) / 100 AS \"Reconciliation Delta\"", |
| 262 | + "rawSql": "SELECT (\n COALESCE((SELECT SUM(spend_cents + included_spend_cents) FROM _tool_cursor_user_spend\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}'), 0)\n - COALESCE((SELECT SUM(charged_cents) FROM _tool_cursor_usage_events\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}'\n AND event_time >= (SELECT MIN(billing_cycle_start) FROM _tool_cursor_user_spend\n WHERE connection_id = ${connection_id} AND scope_id = '${scope_id}')), 0)\n) / 100 AS \"Reconciliation Delta\"", |
263 | 263 | "refId": "A" |
264 | 264 | } |
265 | 265 | ], |
|
564 | 564 | }, |
565 | 565 | { |
566 | 566 | "datasource": "mysql", |
567 | | - "description": "Tab completion acceptance rate: accepted / shown", |
| 567 | + "description": "Tab inline-completion acceptance rate only (tabs_accepted / tabs_shown); see AI Line Acceptance Rate for all accepted lines", |
568 | 568 | "fieldConfig": { |
569 | 569 | "defaults": { |
570 | 570 | "color": { "fixedColor": "blue", "mode": "fixed" }, |
|
636 | 636 | "title": "Feature Adoption (Weekly)", |
637 | 637 | "type": "timeseries" |
638 | 638 | }, |
| 639 | + { |
| 640 | + "datasource": "mysql", |
| 641 | + "description": "Daily sum of AI-suggested lines accepted into the editor (acceptedLinesAdded from /teams/daily-usage-data)", |
| 642 | + "fieldConfig": { |
| 643 | + "defaults": { |
| 644 | + "color": { "fixedColor": "blue", "mode": "fixed" }, |
| 645 | + "custom": { |
| 646 | + "drawStyle": "line", |
| 647 | + "fillOpacity": 20, |
| 648 | + "lineWidth": 2, |
| 649 | + "showPoints": "auto", |
| 650 | + "pointSize": 4 |
| 651 | + }, |
| 652 | + "unit": "locale", |
| 653 | + "decimals": 0 |
| 654 | + }, |
| 655 | + "overrides": [] |
| 656 | + }, |
| 657 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 36 }, |
| 658 | + "id": 204, |
| 659 | + "options": { |
| 660 | + "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, |
| 661 | + "tooltip": { "mode": "single", "sort": "none" } |
| 662 | + }, |
| 663 | + "pluginVersion": "11.0.0", |
| 664 | + "targets": [ |
| 665 | + { |
| 666 | + "datasource": "mysql", |
| 667 | + "format": "table", |
| 668 | + "rawQuery": true, |
| 669 | + "rawSql": "SELECT usage_date AS time,\n SUM(accepted_lines_added) AS \"Accepted Lines Added\"\nFROM _tool_cursor_daily_usage\nWHERE $__timeFilter(usage_date)\n AND connection_id = ${connection_id}\n AND scope_id = '${scope_id}'\n AND is_active = 1\nGROUP BY usage_date\nORDER BY 1", |
| 670 | + "refId": "A" |
| 671 | + } |
| 672 | + ], |
| 673 | + "title": "Accepted Lines Added", |
| 674 | + "type": "timeseries" |
| 675 | + }, |
| 676 | + { |
| 677 | + "datasource": "mysql", |
| 678 | + "description": "Share of all lines added that came from accepted AI suggestions (accepted_lines_added / total_lines_added)", |
| 679 | + "fieldConfig": { |
| 680 | + "defaults": { |
| 681 | + "color": { "fixedColor": "blue", "mode": "fixed" }, |
| 682 | + "custom": { |
| 683 | + "drawStyle": "line", |
| 684 | + "fillOpacity": 10, |
| 685 | + "lineWidth": 2, |
| 686 | + "showPoints": "auto", |
| 687 | + "pointSize": 4 |
| 688 | + }, |
| 689 | + "unit": "percent", |
| 690 | + "decimals": 1 |
| 691 | + }, |
| 692 | + "overrides": [] |
| 693 | + }, |
| 694 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 36 }, |
| 695 | + "id": 205, |
| 696 | + "options": { |
| 697 | + "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, |
| 698 | + "tooltip": { "mode": "single", "sort": "none" } |
| 699 | + }, |
| 700 | + "pluginVersion": "11.0.0", |
| 701 | + "targets": [ |
| 702 | + { |
| 703 | + "datasource": "mysql", |
| 704 | + "format": "table", |
| 705 | + "rawQuery": true, |
| 706 | + "rawSql": "SELECT usage_date AS time,\n ROUND(SUM(accepted_lines_added) * 100.0 / NULLIF(SUM(total_lines_added), 0), 1) AS \"AI Line Acceptance Rate\"\nFROM _tool_cursor_daily_usage\nWHERE $__timeFilter(usage_date)\n AND connection_id = ${connection_id}\n AND scope_id = '${scope_id}'\n AND is_active = 1\nGROUP BY usage_date\nORDER BY 1", |
| 707 | + "refId": "A" |
| 708 | + } |
| 709 | + ], |
| 710 | + "title": "AI Line Acceptance Rate", |
| 711 | + "type": "timeseries" |
| 712 | + }, |
639 | 713 | { |
640 | 714 | "collapsed": true, |
641 | | - "gridPos": { "h": 1, "w": 24, "x": 0, "y": 36 }, |
| 715 | + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 44 }, |
642 | 716 | "id": 104, |
643 | 717 | "title": "Diagnostics", |
644 | 718 | "type": "row", |
|
647 | 721 | "datasource": "mysql", |
648 | 722 | "description": "Row counts and latest timestamps per _tool_cursor_* table for pipeline health monitoring", |
649 | 723 | "fieldConfig": { "defaults": {}, "overrides": [] }, |
650 | | - "gridPos": { "h": 6, "w": 12, "x": 0, "y": 45 }, |
| 724 | + "gridPos": { "h": 6, "w": 12, "x": 0, "y": 53 }, |
651 | 725 | "id": 40, |
652 | 726 | "options": { |
653 | 727 | "cellHeight": "sm", |
|
0 commit comments