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/tools/gopls: add a prompt to ask users if they want to enable Go telemetry #62576

Closed
findleyr opened this issue Sep 11, 2023 · 4 comments
Closed
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

As part of opt-in transparent telemetry (#58894), we're planning to experiment with a prompt asking users if they want to enable Go telemetry reporting. This is part of the "campaign cost" of opt-in telemetry mentioned at https://research.swtch.com/telemetry-opt-in. Implementing this prompt in gopls rather than the VS Code Go extension will result in a a more representative sample of participants across different editors.

Asking for the attention of our users is an important part of the opt-in telemetry model, but also must be done with great care. Here are some ideas for how to make prompting minimally invasive (other ideas welcome):

  • Once a user has responded to the prompt from any LSP session, we should not prompt again. For example, I regularly use both VS Code and vim, and don't want to be prompted twice.
  • We must have a gopls setting that permanently disables prompting.
  • We should roll out the prompt out slowly, evaluating its effectiveness.

Therefore, we plan to do the following:

  1. Implement a new global persistent configuration mechanism for gopls. Previously, all configuration was per-session and managed by the editor. Storing the prompt response will be the first time that gopls persists its own configuration.
  2. Add a "prompt.telemetry" setting controlling whether or not to ask about enabling telemetry. Until we're confident that the prompt is reliable and effective, the default value for this setting will be false.
  3. Implement the prompt using the LSP ShowMessage request, which allows the server to query the user through the editor UI.
  4. For a small sample of VS Code Go users, send "prompt.telemetry": true from the VS Code client, and use the rate of new telemetry participants as a signal for whether the prompt is effective. We'll also pay close attention to any feedback we receive about the prompt itself.

We expect that telemetry will help our team to deliver a faster, more robust, and generally higher quality product. If the prompt proves to be a net benefit for our users, we'll consider enabling it more widely.

@findleyr findleyr added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Sep 11, 2023
@findleyr findleyr added this to the gopls/v0.14.0 milestone Sep 11, 2023
@gopherbot
Copy link

Change https://go.dev/cl/527717 mentions this issue: telemetry: expose Mode and SetMode

gopherbot pushed a commit to golang/telemetry that referenced this issue Sep 13, 2023
Gopls needs to be able to query and set the current telemetry mode.
Expose the Mode and SetMode APIs for this purpose.

For golang/go#62576

Change-Id: I1f9aa03595cfa1b60c88ebe8a560c5ac6a1b1b40
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/527717
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
@gopherbot
Copy link

Change https://go.dev/cl/529355 mentions this issue: gopls/internal/lsp: add an idle prompt asking users to enable telemetry

@gopherbot
Copy link

Change https://go.dev/cl/530057 mentions this issue: gopls/internal/lsp: update prompting logic for local/off mode

gopherbot pushed a commit to golang/tools that referenced this issue Sep 22, 2023
We're eliminating the "local" telemetry mode, in favor of just on/off.

Update gopls logic accordingly.

For golang/go#62576

Change-Id: I41089062bf6963391ace059efe5ab4775a438c9e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/530057
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@gopherbot
Copy link

Change https://go.dev/cl/530459 mentions this issue: gopls/internal/lsp: update telemetry prompt and add a follow-up message

gopherbot pushed a commit to golang/tools that referenced this issue Sep 22, 2023
Update the telemetry prompt per discussion, and add a follow up message
with more information after telemetry is enabled.

For golang/go#62576

Change-Id: If03cade72b27a765da43db293c74d53d19b95a9c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/530459
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants