aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2024-05-08 15:54:12 -0400
committerMichael Matloob <matloob@golang.org>2024-05-16 20:16:39 +0000
commit036e93ba7631bb12844f01078979e761144f227f (patch)
treee87227b31a086b251666b1aeba25987021baeafd /src/cmd/go/alldocs.go
parent26ed0528c76d10883e0d24ca8b7bb87e62dc4487 (diff)
downloadgo-036e93ba7631bb12844f01078979e761144f227f.tar.gz
go-036e93ba7631bb12844f01078979e761144f227f.zip
cmd/go: add go telemetry command and GOTELEMETRY, GOTELEMETRYDIR
Add the go telemetry command to support setting and viewing the telemetry mode. Also add the non-settable GOTELEMETRY and GOTELEMETRYDIR variables to go env, which contain the mode and telemetry dir. For #67111 Change-Id: Id7e89cefe30acfe3d865fa467315fe7cda975de9 Reviewed-on: https://go-review.googlesource.com/c/go/+/584535 Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Sam Thanawalla <samthanawalla@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 9263be5a6bc..52fb4c25a82 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -27,6 +27,7 @@
// mod module maintenance
// work workspace maintenance
// run compile and run Go program
+// telemetry manage telemetry data and settings
// test test packages
// tool run specified go tool
// version print Go version
@@ -1754,6 +1755,38 @@
//
// See also: go build.
//
+// # Manage telemetry data and settings
+//
+// Usage:
+//
+// go telemetry [off|local|on]
+//
+// Telemetry is used to manage Go telemetry data and settings.
+//
+// Telemetry can be in one of three modes: off, local, or on.
+//
+// When telemetry is in local mode, counter data is written to the local file
+// system, but will not be uploaded to remote servers.
+//
+// When telemetry is off, local counter data is neither collected nor uploaded.
+//
+// When telemetry is on, telemetry data is written to the local file system
+// and periodically sent to https://telemetry.go.dev/. Uploaded data is used to
+// help improve the Go toolchain and related tools, and it will be published as
+// part of a public dataset.
+//
+// For more details, see https://telemetry.go.dev/privacy.
+// This data is collected in accordance with the Google Privacy Policy
+// (https://policies.google.com/privacy).
+//
+// To view the current telemetry mode, run "go telemetry".
+// To disable telemetry uploading, but keep local data collection, run
+// "go telemetry local".
+// To enable both collection and uploading, run “go telemetry on”.
+// To disable both collection and uploading, run "go telemetry off".
+//
+// See https://go.dev/doc/telemetry for more information on telemetry.
+//
// # Test packages
//
// Usage: