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: collect bug stack counter #62249

Closed
hyangah opened this issue Aug 23, 2023 · 1 comment
Closed

x/tools/gopls: collect bug stack counter #62249

hyangah opened this issue Aug 23, 2023 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Telemetry-Accepted Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Aug 23, 2023

  • Counter: gopls/bug
  • Title: Number of bug report calls
  • Description: count the bugs reported through gopls/internal/bug APIs
  • Type: stack
  • Depth: 16
  • Issue: https://go.dev/issues/62249
  • Program: golang.org/x/tools/gopls
  • Version: v0.13.0

Why?

For rare situations where our assumption doesn't hold and gopls cannot proceed normally,
gopls calls this api. This stack counter counts how frequently this situation happens
and what assumption (code location) was violated. This information allows us to discover
and address the bugs.

Alternatives are either 1) crashing or 2) asking users to report when they notice it.
Neither is ideal or scalable.

Does it carry sensitive user information?

No.
This includes only the gopls's stack trace which doesn't include user information.

How?

https://github.com/golang/tools/blob/master/gopls/internal/bug/bug.go#L69
https://github.com/golang/tools/blob/0a044c0b5b3c2becb2e8ef5d92acca07f6ab8b60/gopls/internal/bug/bug.go#L105-L107

note: The default is 'local' which does not send any data to the telemetry server. Users must opt-in explicitly.

@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 Aug 23, 2023
@gopherbot gopherbot added this to the Unreleased milestone Aug 23, 2023
@hyangah hyangah modified the milestones: Unreleased, gopls/backlog Aug 29, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/528295 mentions this issue: internal/configgen: add approved new gopls counters

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Telemetry-Accepted Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Development

No branches or pull requests

3 participants