]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/telemetry: add a shim package around telemetry
authorMichael Matloob <matloob@golang.org>
Wed, 13 Mar 2024 17:27:03 +0000 (13:27 -0400)
committerMichael Matloob <matloob@golang.org>
Thu, 14 Mar 2024 21:07:20 +0000 (21:07 +0000)
commitd45e8bf403e0296297d4028a75ad61cb309cd12c
tree6e85719607e1901936564b55e684e4da8a7b2ace
parent1d96895ccbea79daa9d6538bf9da6a4dd197336b
cmd/internal/telemetry: add a shim package around telemetry

The purpose of this package is to have a build tagged variant so that
when we're building the bootstrap go command it does not depend on the
net package. (net is a dependency of golang.org/x/telemetry/counter on
Windows).

The TESTGO_TELEMETRY_DIR environment variable used by the go tests to
change the telemetry directory is renamed to TEST_TELEMETRY_DIR to
make it more general to other commands that might want to set it for
the purpose of tests. The test telemetry directory is now set using
telemetry.Start instead of countertest.Open. This also means that the
logic that decides whether to upload counter files is now going to run
from the cmd/go tests (but that's okay because it's aleady been
running when cmd/go has been invoked outside of its tests.

Change-Id: Ic4272e5083facde010482d8b8fc3c95c03564bc9
Reviewed-on: https://go-review.googlesource.com/c/go/+/571096
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
src/cmd/go/go_test.go
src/cmd/go/internal/base/base.go
src/cmd/go/main.go
src/cmd/go/script_test.go
src/cmd/go/telemetry.go [deleted file]
src/cmd/go/telemetry_bootstrap.go [deleted file]
src/cmd/internal/telemetry/telemetry.go [new file with mode: 0644]
src/cmd/internal/telemetry/telemetry_bootstrap.go [new file with mode: 0644]