I just updated go from 1.21 to 1.23 and the lastest version has a new feature i.e Go Telemerty. I have enable this feature by executing “go telemetry on” command. Its been more than two week I am running my application with telemetry on, but I don’t find any telemetry log files generated under os.UserConfigDir()/go/telemetry. Am I looking under the right location or Am I missing any steps here, Could you please guide.
As per the go documentation setting Telemetry on is enough and we don’t need to do any other activity to get this telemetry logs/data generated.
gotelemetry env will show your local telemetry folder path if you want to double check you’re looking in the right place. (gotelemetry must be one word.)
Thank you for your assistance—it was very helpful. I am looking for one more clarification, detailed below.
Since Go is a compiled language, you can compile a Go application to generate an executable (e.g., .exe for Windows). This executable can then run directly on the target (customer) machine without needing Go or Go libraries installed.
Regarding telemetry, if we need to disable telemetry on the target/customer machine, we must turn off telemetry on the machine where the code is compiled. By setting telemetry to OFF during compilation, the compiled executable will not generate telemetry data when run on the target machine. Is my understanding correct?
Regarding telemetry, if we need to disable telemetry on the target/customer machine, we must turn off telemetry on the machine where the code is compiled. By setting telemetry to OFF during compilation, the compiled executable will not generate telemetry data when run on the target machine. Is my understanding correct?
You don’t need to disable telemetry when building binaries for distribution — telemetry does not apply to binaries you compile, only to Go’s developer tooling.
Go’s telemetry is only about understanding how Go developers use the Go toolchain (the go command and other developer binaries like gopls).
Binaries you make with go do not send telemetry data to the Go team. Your users don’t have to change anything if they use binaries you’ve made with Go, and you are not opting your users into data collection by enabling telemetry in the Go toolchain.
Thanks for the reply.
Sorry for bugging you on the same topic, there is no much documentation available in the internet.
I am bit confued now, even in the development environment to run go applications, we build it and create binary exe’s and then we run the exe’s only. Does it mean telemetry data won’t be generated if we run the exe’s in development environment? If yes, then when would this telemetry data is generated?
If you run your program with go run, Go collects telemetry data about the go run process.
Go does not collect telemetry data when you run a compiled application separately from Go tooling. If you go build to compile your hello application and then run ./hello, Go collects telemetry from the go build invocation but not from ./hello.
The Go Telemetry page notes that the scope is limited to Go’s tooling:
Go telemetry is a way for Go toolchain programs to collect data about their performance and usage. Here “Go toolchain” means developer tools maintained by the Go team, including the go command and supplemental tools such as the Go language server gopls or Go security tool govulncheck. Go telemetry is only intended for use in programs maintained by the Go team and their selected dependencies like Delve.