usage-stats: build DDEV commands breakdown from filtered live data#690
Open
rfay wants to merge 1 commit into
Open
usage-stats: build DDEV commands breakdown from filtered live data#690rfay wants to merge 1 commit into
rfay wants to merge 1 commit into
Conversation
The commands section previously rendered a saved Amplitude chart whose allow-list excluded `drush` and was polluted with site-specific custom command names. Replace it with an ad hoc Events Segmentation query (Command event grouped by Command Name, totals, last 7 days) filtered in code to a version-controlled list of documented ddev commands (DDEV_COMMANDS, from docs.ddev.com). This drops the custom-command aggregate, undocumented/legacy names, and second-level sub-args tracked as their own name (e.g. pantheon/acquia from `ddev pull`), while including drush. Show the top 20 as bars plus an expandable full table of all documented commands with usage, mirroring the Add-on Usage section. Drop the now-unused saved chart and its share link. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
🌐 Fork Preview for PR #690 https://pr-690.ddev-com-fork-previews.pages.dev This preview updates automatically when you push changes to your fork. |
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.
Summary
The usage-stats "DDEV Commands" section previously rendered a saved Amplitude chart whose allow-list excluded
drushand was polluted with site-specific custom command names. This replaces that with an ad hoc Events Segmentation query filtered in code against a version-controlled list of documented DDEV commands.getCommandUsage()insrc/lib/amplitude.tsqueries theCommandevent grouped byCommand Name(totals, last 7 days) and filters toDDEV_COMMANDS— the built-in commands documented at docs.ddev.com.custom-commandaggregate, undocumented/legacy names, and second-level sub-args tracked as their own name (e.g.pantheon/acquiafromddev pull), while includingdrush.Notes
pull/pushdon't appear in the list because Amplitude records them under the provider sub-arg (pantheon,acquia,platform,upsun,lagoon), which already have the dedicated "Bundledddev pullUsage" section.Test plan
/usage-statsagainst live Amplitude data: 20 command bars up top, 58 documented commands in the expanded table (exec→spark), nocustom-command/status/custom names.astro checkreports no errors in the changed files.🤖 Generated with Claude Code