x/tools/gopls: add a debug endpoint to download diagnostic information #45602
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
A few patterns have emerged related to troubleshooting gopls issues:
EDIT: after a couple years, we have new ideas and new problems. Coopting this feature request for the v0.12.0 milestone.
Especially with the new gopls performance work, we need a way to collect debug information from an already running gopls. We've seen that custom commands are a good way to achieve this, as they leverage the LSP protocol and therefore don't need any additional endpoints. A custom debuging command should enable the following:
With #45518, we'll be able to dynamically start the gopls debug server. This means that users should always be able to access a user interface into internals of the running gopls process. We should leverage this to make it easier to collect diagnostic information.This is the idea we've discussed:1. add a new endpoint to the debug server that provides a form allowing the user to select different types of diagnostic information (off the top of my head: RPC logs, heap dump, profile, execution traces), and specify a collection period.2. when this form is submitted, start collecting this information for the specified period.3. after collection completes, redirect the user to download a zipped payload that they can send to us.The text was updated successfully, but these errors were encountered: