jbsmith7741 opened a new pull request, #9204: URL: https://github.com/apache/devlake/pull/9204
### Summary This PR adds **Enterprise API key support** to the Cursor plugin, enabling the collection of analytics data exclusively available to Cursor Enterprise teams. It also introduces automatic token-tier detection and new Grafana dashboards for enterprise metrics. #### Enterprise Data Collection (New Collectors) | Collector | Enterprise Only? | Description | |---|---|---| | AI Code Commits | ✅ Yes | Commit-level AI code tracking | | AI Code Changes | ✅ Yes | File/line-level AI code attribution | | AI Code Commit Details | ✅ Yes | Per-commit enrichment (requires probe) | | BugBot Reviews | ✅ Yes (optional) | BugBot automated review analytics | | Conversation Insights | ✅ Yes (optional) | AI conversation intent/outcome data | ** Auto-Refresh Permissions at Pipeline Start** Each pipeline run re-probes optional endpoints and updates the connection's capability flags — no manual "Test Connection" click required when team settings change. #### New Grafana Dashboards Two new dashboards (MySQL + PostgreSQL variants each): - **cursor-enterprise** — AI code tracking: commits, changes, annotated code ranges; enterprise spend; member usage breakdown - **cursor-bugbot** — BugBot review counts, severity distribution, finding trends --- ### Does this close any open issues? N/A ### Screenshots **Connection overview — key type badge and capability tags:** <img width="826" height="328" alt="Cursor_connection_overview" src="https://github.com/user-attachments/assets/36fbcc75-a2ac-453f-8ea7-007b07a3e925" /> **Team Admin key (blue tag):** <img width="837" height="956" alt="Cursor_team_token" src="https://github.com/user-attachments/assets/832e7e61-fdbc-4306-a1c9-113e44d4ec96" /> **Personal key — clear error guidance:** <img width="817" height="198" alt="Cursor_Personal_token_error" src="https://github.com/user-attachments/assets/d426d10a-ed93-41d6-8c72-4058ab75c4c7" /> **Enterprise key (purple tag) — all collectors available:** <img width="428" height="247" alt="Cursor_enterprise" src="https://github.com/user-attachments/assets/d5aac211-71b1-4c08-9948-df6b3d4e64a7" /> #### **cursor-enterprise Grafana dashboard:** <img width="1440" height="1706" alt="cursor-enterprise" src="https://github.com/user-attachments/assets/202db1fd-ea4d-48ad-9617-e7ea9d3af037" /> #### **cursor-bugbot Grafana dashboard:** <img width="1440" height="1442" alt="cursor-bugbot" src="https://github.com/user-attachments/assets/2e820b86-0d55-4bfd-bd81-9ff8abec6c65" /> ### Other Information - 7 migration scripts added covering new tables, schema fixes, and column widening - E2E snapshot tests cover all new extractors (AI code commits/changes/commit-details, BugBot reviews, Conversation Insights) - `KeyTier` is never downgraded by a transient probe failure to prevent enterprise collector flapping - Labels to add: `pr-type/feature-development` -- 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]
