Summary
Since #73036, we have collected the third party tool usage of gotests, goplay and gomodifytags.
However the data is still not comprehensive enough to allow us make the decision to migrate the tool usage from third party tools to gopls. This proposal is adding telemetry for understanding the usage of the gopls offerings and third party tools.
VSCode-Go and gopls offer users to trigger gopls.add_test
and gopls.modifytags
in three ways. Command Palette, context menu and code action. Offers users to trigger gotests
gomodifytags
only through the first two options.
With the telemetry below, it allow us to compare apples to apples so we won't compare the third party tool usage of vscode users with gopls command usage of all users. With the trigger source, this also allow us to understand the users' command trigger preference.
// Indicates the command and the source of trigger.
// The bucket have two elements, the command and it's trigger source.
COMMAND_TRIGGER_GOPLS_ADD_TEST_COMMAND_PALETTE = 'vscode-go/command/trigger:gopls.add_test-command_palette',
COMMAND_TRIGGER_GOPLS_ADD_TEST_CONTEXT_MENU = 'vscode-go/command/trigger:gopls.add_test-context_menu',
COMMAND_TRIGGER_GOPLS_ADD_TEST_CODE_ACTION = 'vscode-go/command/trigger:gopls.add_test-code_action',
COMMAND_TRIGGER_GOPLS_MODIFY_TAGS_COMMAND_PALETTE = 'vscode-go/command/trigger:gopls.modify_tags-command_palette',
COMMAND_TRIGGER_GOPLS_MODIFY_TAGS_CONTEXT_MENU = 'vscode-go/command/trigger:gopls.modify_tags-context_menu',
COMMAND_TRIGGER_GOPLS_MODIFY_TAGS_CODE_ACTION = 'vscode-go/command/trigger:gopls.modify_tags-code_action',
COMMAND_TRIGGER_GOTESTS_COMMAND_PALETTE = 'vscode-go/command/trigger:gotests-command_palette',
COMMAND_TRIGGER_GOTESTS_CONTEXT_MENU = 'vscode-go/command/trigger:gotests-context_menu',
COMMAND_TRIGGER_GOMODIFYTAGS_COMMAND_PALETTE = 'vscode-go/command/trigger:gomodifytags-command_palette',
COMMAND_TRIGGER_GOMODIFYTAGS_CONTEXT_MENU = 'vscode-go/command/trigger:gomodifytags-context_menu'
- Counter: vscode-go/command/trigger: {
gotests-command_palette,
gotests-context_menu,
gomodifytags-command_palette,
gomodifytags-context_menu,
gopls.add_test-command_palette,
gopls.add_test-context_menu,
gopls.add_test-code_action,
gopls.modify_tags-command_palette,
gopls.modify_tags-context_menu,
gopls.modify_tags-code_action,
}
- Title: vscode-go command trigger source
- Description: Measure the command trigger in vscode-go.
- Program: github.com/golang/vscode-go/vscgo
- Versions: v0.49.{1, 2,3,4}, v0.{50,51,52,53}.{0,1,2,3,4},
Each entry in the bucket is following pattern as {COMMAND}-{SOURCE TRIGGER}. the command can either mean a binary command execution like gotests
or gomodifytags
, or a vscode command execution through vscode.executeCommand(....)
, or a LSP command execution through method lsp.executeCommand
. In this case, gopls.add_test and gopls.modify_tags are both a vscode command and a lsp command.
The bucket size is 2+2+3+3
, because third party tools does not have trigger from code actions. goplay
is not in the list because we only offer goplay from the command palette so the tool/usage is also the command palette usage.
@golang/tools-team @findleyr
Proposed Config Change
Comment From: gopherbot
Change https://go.dev/cl/693015 mentions this issue: extension/src: collecting telemetry for command and trigger
Comment From: gopherbot
Change https://go.dev/cl/693016 mentions this issue: internal/config: add counter for vscode command trigger