Skip to content

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

Closed

Description

@hyangah
  • 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.

Activity

  1. converted this from a draft issue on Aug 23, 2023
  2. added
    ToolsThis label describes issues relating to any tools in the x/tools repository.
    goplsIssues related to the Go language server, gopls.
    on Aug 23, 2023
  3. added this to the Unreleased milestone on Aug 23, 2023
  4. moved this to In Progress in Telemetry Proposalson Sep 7, 2023
  5. gopherbot commented on Sep 13, 2023

    @gopherbot
    Contributor

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

  6. moved this from In Progress to Done in Telemetry Proposalson Feb 14, 2024
  7. locked and limited conversation to collaborators on Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeTelemetry-AcceptedToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions