Skip to content

proposal: cmd/go: consider making GOTELEMETRY=off settable #68960

@findleyr

Description

@findleyr

As discussed in #68928, while go env GOTELEMETRY reports the current go telemetry mode value, GOTELEMETRY=off has no effect as GOTELEMETRY is not a settable environment variable. Apart from improving the documentation, we should consider supporting GOTELEMETRY=off as a settable value.

We can never support GOTELEMETRY=on being settable, because we want users to explicitly run go telemetry on to enable telemetry, and because the telemetry mode is a global property that controls whether telemetry data is uploaded. By default, telemetry data is stored in the local file system, and we don't distinguish in that data whether it was recorded while the telemetry mode was local or on. When the telemetry mode is set to on, we don't want to upload data that was recorded while the telemetry mode was local.

However, apart from the asymmetry I don't think there's a reason we couldn't support GOTELEMETRY=off.

It might be convenient to support disabling telemetry with GOTELEMETRY=off. We should consider it.

EDIT (2024-08-28): updated to explain a bit more why GOTELEMETRY=on can't be settable with the current data model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Proposaltelemetryx/telemetry issues

    Type

    No type

    Projects

    Status

    Declined

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions