feat(cursor): add team usage and cost plugin - #9017
Open
jbsmith7741 wants to merge 9 commits into
Open
Conversation
Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Set collectMembers PageSize to zero so teams/members is fetched once instead of re-inserting the full roster forever. * Extend connection test to probe members, spend, and usage events Admin API permissions before pipelines run.
…sCosts Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Add daily usage collector, extractor, and table for per-user adoption metrics. * Reorganize Cursor Usage overview panels and update related Grafana dashboards. Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Store accepted, total line, and apply counts from daily usage API with migration. * Add Grafana panels and fix spend reconciliation to include included spend. Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Switch usage events and daily usage extractors to StatefulApiExtractor with versioned one-time full re-extract. * Chunk filtered-usage-events into 30-day ranges and add plugin README. Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Align cost panels with currencyUSD and stacked daily on-demand versus included spend. * Document Enterprise AI Code Tracking gaps in the cursor plugin README. Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
* Limit default parallelism to four with DEVLAKE_PLUGIN_PARALLELISM override to reduce OOM on small hosts. * Add Cursor cost_reconciliation.sql queries and remove obsolete README rak_tools reference. Signed-off-by: Joshua Smith <jbsmith7741@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quality check
backend/plugins/cursor/README.md, Grafana dashboard notes,cost_reconciliation.sqlcollector_utils,usage_events_extractor,connection_test), E2E extractor fixtures underbackend/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/)/teams/members,/teams/filtered-usage-events,/teams/spend, and/teams/daily-usage-datarequestsCostscost_reconciliation.sqlfor comparing spend rollups vs usage events after a full billing-cycle backfillConfig UI
Grafana
grafana/dashboards/mysql/cursor-usage.jsonai-cost-efficiency.jsonandmulti-ai-comparison.jsonBuild
DEVLAKE_PLUGIN_PARALLELISM) to reduce OOM on small hosts / Docker DesktopHow to verify
make dep && make build(ormake godev)cd backend && go test ./plugins/cursor/...make e2e-test(or targeted cursor e2e if documented in README)cursor-usagedashboard; confirm_tool_cursor_*panels return dataDoes this close any open issues?
No
Screenshots
Other Information
_tool_cursor_*directly).