Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/telemetry/config: collect third party tool usage from vscgo #73036

Closed
h9jiang opened this issue Mar 25, 2025 · 2 comments
Closed

x/telemetry/config: collect third party tool usage from vscgo #73036

h9jiang opened this issue Mar 25, 2025 · 2 comments
Assignees
Labels
telemetry x/telemetry issues Telemetry-Accepted Telemetry-Proposal Issues proposing new telemetry counters.
Milestone

Comments

@h9jiang
Copy link
Member

h9jiang commented Mar 25, 2025

Summary

Context: vscgo is a binary that can be installed by vscode-go extension and collect telemetry from vscode-go extension. vscgo in written in go and vscode-go is written in typescript. There are some data collected by vscgo today but they are not being uploaded due to the missing configuration in x/telemetry config.json. (We can come back to those telemetry later because that is not the purpose of this proposal). The detailed architecture for vscgo can be found in golang/vscode-go#3121.

The goal of this proposal is help vscode-go developer understand the third-party tool usage and eventually deprecate third-party tools in favor of gopls built in functionalities. E.g. replace gotests binary with gopls.add_tests source code action. See golang/vscode-go#1652.

  • Counter: vscode-go/tool/usage:{gotests, gomodifytags, goplay}
  • Title: Tool Usage
  • Description: Measure the tool usage in vscode-go.
  • Program: github.com/golang/vscode-go/vscgo
  • Versions: v0.47.{2,3,4}, v0.{48,49,50,51,52,53}.{0,1,2,3,4},

Explanation for version:

  • VSCode-Go does not need to collect rc e.g. v0.47.0-rc.1 because rc extension need to be manually installed so not much data will be collected.
  • VSCode-Go follow vscode marketplace recommendation. The odd number is prerelease version, the even number is release version. We could introduce the telemetry collection in v0.47.2 because it is a prerelease version but should not introduce the collection in v0.46.2 because it's a release version.
  • Similar to gopls versions, collect the first 5 patch versions for every minor version starting from v0.48

Open question: gopls source code action only support adding test for a single function. gotests support adding test for the entire file (all function inside of a given file) and entire package. I wonder if this level of detail need to be collected or not.

cc @hyangah @golang/tools-team

Proposed Config Change

Will work on CL once we agree on the counter name and usage.

@h9jiang h9jiang added the Telemetry-Proposal Issues proposing new telemetry counters. label Mar 25, 2025
@gopherbot gopherbot added the telemetry x/telemetry issues label Mar 25, 2025
@gopherbot gopherbot added this to the Unreleased milestone Mar 25, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/661055 mentions this issue: internal/config: add vscode-go/tool/usage counter

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/661175 mentions this issue: extension/src: collect third party tool usage

gopherbot pushed a commit to golang/vscode-go that referenced this issue Mar 31, 2025
CL 661055 under review for x/telemetry change.

For golang/go#73036

Change-Id: I373d6217bdb206b967285c5ac3fddaba27cf2f67
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/661175
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Hongxiang Jiang <[email protected]>
@h9jiang h9jiang self-assigned this Apr 1, 2025
gopherbot pushed a commit to golang/telemetry that referenced this issue Apr 3, 2025
The default padding is derived from gopls releases and does not suit
vscgo. The vscgo follow versioning of vscode-go extension.

Introduce a "module field" in config.txt, both vscgo and govulncheck's
program path is not the same as module path. Command "go list -m --versions"
will return empty when running against govulncheck and vscgo's program
path.

This fixes the issue where the upload config never get bumped for
govulncheck. Luckily, the latest release of govulncheck is 1.1.4.

For golang/go#73036

Change-Id: I2e2ab4990b8471a9edbbed46cecc2d6e5846c025
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/661055
Reviewed-by: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
@h9jiang h9jiang closed this as completed Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
telemetry x/telemetry issues Telemetry-Accepted Telemetry-Proposal Issues proposing new telemetry counters.
Projects
Status: No status
Development

No branches or pull requests

3 participants