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: record telemetry for which settings are used #71285

Open
findleyr opened this issue Jan 15, 2025 · 1 comment
Open

x/tools/gopls: record telemetry for which settings are used #71285

findleyr opened this issue Jan 15, 2025 · 1 comment
Assignees
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
Member

We want to use telemetry to answer questions about which settings are being customized by our users. This signal can be useful in a number of ways, for example to prioritize improvements to various optional features, suggest that certain configuration can be deprecated, or indicate that certain optional features are not working well (if they are frequently disabled).

A few considerations:

  • For some settings, we just want to record whether they are used (e.g. "buildFlags").
  • For other settings, we want to bucket the actual setting values (e.g. "staticcheck:true")
  • For yet other settings, there are logical sub-settings which may themselves have logical bucketing (e.g. "analyses/deprecated:false").
  • Some settings can be set in multiple ways (usually in a transitional period when an old setting name is deprecated).

Therefore, this instrumentation will necessarily be customized to each individual setting.

The following schema seems pretty natural: gopls/setting/<setting>[/<subsetting>][:buckets]

For example, given the following configuration

{
  "buildFlags": ["-tags=mytag"],
  "staticcheck": true,
  "analyses": {
    "deprecated": false,
  }
}

we'd record the following counts:

gopls/setting/buildFlags
gopls/setting/staticcheck:true
gopls/setting/analyses/deprecated:false

Notably, we only record the settings that are actually explicitly set by the user. We don't record the effective values of all settings. I briefly considered recording the effective values of each setting, but that is a lossy projection: it loses information about which settings are actually being explicitly set, and we may want to see when users are customizing a setting, even if they are customizing it to the default value.

This issue tracks only the addition of this instrumentation. Separate telemetry proposals must be filed for any collection of this data from users who have opted in to telemetry.

CC @adonovan

@findleyr findleyr added this to the gopls/v0.18.0 milestone Jan 15, 2025
@findleyr findleyr self-assigned this Jan 15, 2025
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jan 15, 2025
@gabyhelp
Copy link

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

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

3 participants