File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,7 @@ func (s *Server) checkViewGoVersions() {
317
317
if oldestVersion == - 1 || viewVersion < oldestVersion {
318
318
oldestVersion , fromBuild = viewVersion , false
319
319
}
320
+ telemetry .RecordViewGoVersion (viewVersion )
320
321
}
321
322
322
323
if msg , mType := versionMessage (oldestVersion , fromBuild ); msg != "" {
Original file line number Diff line number Diff line change 5
5
package telemetry
6
6
7
7
import (
8
+ "fmt"
8
9
"os"
9
10
10
11
"golang.org/x/telemetry/counter"
@@ -50,3 +51,12 @@ func RecordClientInfo(params *protocol.ParamInitialize) {
50
51
}
51
52
counter .Inc (client )
52
53
}
54
+
55
+ // RecordViewGoVersion records the Go minor version number (1.x) used for a view.
56
+ func RecordViewGoVersion (x int ) {
57
+ if x < 0 {
58
+ return
59
+ }
60
+ name := fmt .Sprintf ("gopls/goversion:1.%d" , x )
61
+ counter .Inc (name )
62
+ }
You can’t perform that action at this time.
0 commit comments