Skip to content

Commit

Permalink
gopls/telemetry: accept vscode-insiders as a known editor
Browse files Browse the repository at this point in the history
Also, for unknown editors, increment a local counter in addition to
gopls/client:other

Change-Id: Id689343502f62b1479497eca81b0ef3944898d8c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/519735
TryBot-Result: Gopher Robot <[email protected]>
gopls-CI: kokoro <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Peter Weinberger <[email protected]>
  • Loading branch information
pjweinbgo committed Aug 16, 2023
1 parent 64e9248 commit a80931d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gopls/internal/telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func RecordClientInfo(params *protocol.ParamInitialize) {
switch params.ClientInfo.Name {
case "Visual Studio Code":
client = "gopls/client:vscode"
case "Visual Studio Code - Insiders":
client = "gopls/client:vscode-insiders"
case "VSCodium":
client = "gopls/client:vscodium"
case "code-server":
Expand All @@ -47,6 +49,10 @@ func RecordClientInfo(params *protocol.ParamInitialize) {
case "Sublime Text LSP":
// https://github.com/sublimelsp/LSP/blob/e608f878e7e9dd34aabe4ff0462540fadcd88fcc/plugin/core/sessions.py#L493
client = "gopls/client:sublimetext"
default:
// at least accumulate the client name locally
counter.New(fmt.Sprintf("gopls/client-other:%s", params.ClientInfo.Name)).Inc()
// but also record client:other
}
}
counter.Inc(client)
Expand Down

0 comments on commit a80931d

Please sign in to comment.