Skip to content

x/tools/gopls: recognize templ user agent in telemetry #70205

@hyangah

Description

@hyangah

Templ language server uses gopls to process go syntax.
Currently, gopls spawned by Templ language server is not distinguishable from gopls editors manage directly.

As Templ is getting popular, I think it is beneficial for both gopls and templ teams to track templ's gopls usage more closely. Hopefully, this information can help when we need to track the protocol compatibility and minimize accidental breakages like in golang/vscode-go#3435 (comment).

In a-h/templ#966 I am proposing to adjust the client info so we can record the chain of lsp participants. I use ; but I am open to other characters. Or even other fields if there are.

Whatever format is chosen, we also need to adjust gopls side to process this format. For example,

https://github.com/golang/tools/blob/f1f7c26696be8f94198beafd05b36843515ac2ba/gopls/internal/cache/snapshot.go#L950
and telemetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions