config: temporarily add gopls@devel to allowed program versions
And increase the default rate from 0.1 to 1.0.
Since the telemetry is opt-in and we are still under development,
we need a higher sampling rate.
For golang/go#62271
Change-Id: I907f9a143878ab20238dd5b1ce71fde4afc24df7
Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/523699
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/config/config.json b/config/config.json
index 58f4bfe..4c0c93f 100644
--- a/config/config.json
+++ b/config/config.json
@@ -496,12 +496,13 @@
"v1.2.3-pre.2",
"v1.2.3-pre.3",
"v1.2.3-pre.4",
- "v1.2.3"
+ "v1.2.3",
+ "devel"
],
"Counters": [
{
"Name": "gopls/client:{vscode,vscodium,code-server,eglot,govim,neovim,coc.nvim,sublimetext,other}",
- "Rate": 0.1
+ "Rate": 1
}
]
}
diff --git a/config/doc.go b/config/doc.go
index 96c75c9..6c5f520 100644
--- a/config/doc.go
+++ b/config/doc.go
@@ -6,4 +6,6 @@
//
// This package contains no actual Go code, and exists only so the config.json
// file can be served by module proxies.
+//
+// The config.json is generated by golang.org/x/telemetry/internal/configgen.
package config
diff --git a/internal/configgen/main.go b/internal/configgen/main.go
index 563115a..d31629e 100644
--- a/internal/configgen/main.go
+++ b/internal/configgen/main.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:generate go run . -w
+
//go:build go1.21
// Package configgen generates the upload config file stored in the config.json
@@ -174,7 +176,7 @@
minVersions[gcfg.Program] = minVersion(minVersions[gcfg.Program], gcfg.Version)
ccfg := telemetry.CounterConfig{
Name: gcfg.Counter,
- Rate: 0.1, // TODO(rfindley): how should rate be configured?
+ Rate: 1.0, // TODO(rfindley): how should rate be configured?
Depth: gcfg.Depth,
}
if gcfg.Depth > 0 {
@@ -205,6 +207,10 @@
}
}
p.Versions = padVersions(versions[:i], prereleasesForProgram(p.Name), padding)
+ // TODO(hakim): allow to collect counters from gopls@devel. go.dev/issues/62271
+ if p.Name == "golang.org/x/tools/gopls" {
+ p.Versions = append(p.Versions, "devel") // added at the end.
+ }
ucfg.Programs = append(ucfg.Programs, p)
}
sort.Slice(ucfg.Programs, func(i, j int) bool {
diff --git a/internal/configgen/main_test.go b/internal/configgen/main_test.go
index 67f1fa8..9fc4cda 100644
--- a/internal/configgen/main_test.go
+++ b/internal/configgen/main_test.go
@@ -64,10 +64,11 @@
"v1.0.1-pre.1",
"v1.0.1-pre.2",
"v1.0.1",
+ "devel", // Added for go.dev/issues/62271,
},
Counters: []telemetry.CounterConfig{{
Name: "gopls/editor:{emacs,vim,vscode,other}",
- Rate: 0.1,
+ Rate: 1.0,
}},
}},
}
@@ -125,10 +126,11 @@
"v0.15.1-pre.1",
"v0.15.1-pre.2",
"v0.15.1",
+ "devel", // Added for go.dev/issues/62271,
},
Counters: []telemetry.CounterConfig{{
Name: "gopls/editor:{emacs,vim,vscode,other}",
- Rate: 0.1,
+ Rate: 1.0,
}},
}},
}
diff --git a/internal/configgen/syslist.go b/internal/configgen/syslist.go
index 771f40c..6db902c 100644
--- a/internal/configgen/syslist.go
+++ b/internal/configgen/syslist.go
@@ -30,25 +30,6 @@
"zos": true,
}
-// unixOS is the set of GOOS values matched by the "unix" build tag.
-// This is not used for filename matching.
-// This list also appears in cmd/dist/build.go and
-// cmd/go/internal/imports/build.go.
-var unixOS = map[string]bool{
- "aix": true,
- "android": true,
- "darwin": true,
- "dragonfly": true,
- "freebsd": true,
- "hurd": true,
- "illumos": true,
- "ios": true,
- "linux": true,
- "netbsd": true,
- "openbsd": true,
- "solaris": true,
-}
-
// knownArch is the list of past, present, and future known GOARCH values.
// Do not remove from this list, as it is used for filename matching.
var knownArch = map[string]bool{