Skip to content

x/telemetry/internal/counter: ErrDisabled references non-existent GOTELEMETRY environment variable #65503

@rittneje

Description

@rittneje

Go version

n/a

Output of go env in your module/workspace:

n/a

What did you do?

I read the source code of x/telemetry.

https://github.com/golang/telemetry/blob/0391c11e4dcd12fa196c5be1a861988de5b6395c/internal/counter/file.go#L114-L115

What did you see happen?

I expected the error message to be accurate. It currently implies that you can disable telemetry by setting GOTELEMETRY=off.

What did you expect to see?

This error message is incorrect. There is no GOTELEMETRY environment variable. The only way to disable telemetry is to explicitly install golang.org/x/telemetry/cmd/gotelemetry and run gotelemetry off, or equivalently create a file under ${os.UserConfigDir()}/go/telemetry/mode that says "off".

https://github.com/golang/telemetry/blob/0391c11e4dcd12fa196c5be1a861988de5b6395c/internal/telemetry/mode.go#L85-L91

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions