-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gopls/internal/server: conditionally prompt for telemetry
Previously, VS Code Go extension conditionally asked gopls to consider to prompt, only if * it thinks telemetry data was logged for 7days+, and * the user is selected (based on hash of vscode cliet id) This change implements the condition checking inside gopls, so we can enable prompting for other editor users and simplify vscode-go's code. The prompt file format is changed. old format: <state> <prompt_count> new format: <state> <prompt_count> <creation_unix_time> <token> where - creation_unix_time is the guessed telemetry start time (unix time) - token is a random integer in [1, 1000], which is used in sampling decision. This CL adds environment variables to control the creation_unix_time and token values in integration testing. They are also useful for manual testing, and for VS Code Go prompt logic migration. VS Code Go extension had been used a vscode machine id hash and kept its observed telemetry start time in memento. The env vars can be used to forward the info to gopls. For golang/go#67821 Change-Id: I13d2bf6d43ea1e5ef8ebec7eb2f89fc9af8a8db7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/589517 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
- Loading branch information
Showing
2 changed files
with
296 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.