jbsmith7741 opened a new pull request, #9017:
URL: https://github.com/apache/devlake/pull/9017

   
   ### Quality check
   
   - [x] Documentation included — `backend/plugins/cursor/README.md`, Grafana 
dashboard notes, `cost_reconciliation.sql`
   - [x] Test coverage — unit tests (`collector_utils`, 
`usage_events_extractor`, `connection_test`), E2E extractor fixtures under 
`backend/plugins/cursor/e2e/`
   
   ### Summary
   
   Adds a new **Cursor** DevLake plugin that ingests Cursor Team Admin API data 
(members, filtered usage events, billing-cycle spend, and daily usage) into 
`_tool_cursor_*` tables, plus Config UI registration and Grafana dashboards for 
usage and AI cost views.
   
   **Backend (`backend/plugins/cursor/`)**
   
   - Collectors and extractors for `/teams/members`, 
`/teams/filtered-usage-events`, `/teams/spend`, and `/teams/daily-usage-data`
   - Stateful/incremental collection patterns, rate-limit handling, and 
migration scripts for tool-layer schema
   - Fixes: members collector infinite loop; extractor raw params and 
fractional `requestsCosts`
   - `cost_reconciliation.sql` for comparing spend rollups vs usage events 
after a full billing-cycle backfill
   
   **Config UI**
   
   - Plugin registration, connection form (Team Admin API token), icon
   
   **Grafana**
   
   - New `grafana/dashboards/mysql/cursor-usage.json`
   - Cursor panels in `ai-cost-efficiency.json` and `multi-ai-comparison.json`
   
   **Build**
   
   - Cap concurrent CGO plugin builds (default max 4, override via 
`DEVLAKE_PLUGIN_PARALLELISM`) to reduce OOM on small hosts / Docker Desktop
   
   **How to verify**
   
   1. `make dep && make build` (or `make godev`)
   2. `cd backend && go test ./plugins/cursor/...`
   3. `make e2e-test` (or targeted cursor e2e if documented in README)
   4. Config UI: add Cursor connection with Team Admin API key; create 
blueprint and run pipeline
   5. Grafana: import or refresh `cursor-usage` dashboard; confirm 
`_tool_cursor_*` panels return data
   
   ### Does this close any open issues?
   
   No
   
   ### Screenshots
   
   <img width="1150" height="428" alt="cursor_status" 
src="https://github.com/user-attachments/assets/61d2a0e8-e8de-484f-abce-55fd864cced1";
 />
   
   <img width="820" height="712" alt="cursor_setup" 
src="https://github.com/user-attachments/assets/3f70f1ed-636e-4573-b910-d370c03310f3";
 />
   
   <img width="1080" height="1771" alt="cursor_usage" 
src="https://github.com/user-attachments/assets/45209b3d-d293-40e1-89ab-0460c235cd4a";
 />
   
   ### Other Information
   
   - Tool-layer only; no domain-layer converter (dashboards query 
`_tool_cursor_*` directly).
   - Requires Cursor **Team/Business** plan and **Team Admin API key** (not 
user integration keys).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to