Skip to content

[release-branch.go1.27] Make telemetry default configurable through go.env - #2571

Merged
George Adams (gdams) merged 1 commit into
microsoft/release-branch.go1.27from
dev/gdams/backport-telemetry-go1.27
Oct 14, 2026
Merged

George Adams (gdams) merged 1 commit into
microsoft/release-branch.go1.27from
dev/gdams/backport-telemetry-go1.27

Conversation

@gdams

Copy link
Copy Markdown
Member

Summary

Backport #2566 to microsoft/release-branch.go1.27.

  • define MS_GOTOOLCHAIN_TELEMETRY_ENABLED=1 in the installation-wide GOROOT/go.env
  • resolve the setting through the standard Go configuration hierarchy
  • preserve process environment and user GOENV precedence
  • expose and document the setting through go env
  • keep the script test harness exercising its fake Application Insights endpoint

This lets distributions change the installation default without patching the telemetry implementation. Users can still override that default through the process environment or go env -w.

Validation

  • rebuilt the Go 1.27 toolchain with src/make.bash
  • MS_GOTOOLCHAIN_TELEMETRY_ENABLED=0 go test cmd/go -run '^TestScript$/^(env_write|mod_permissions)$' -count=1
  • go test cmd/internal/telemetry/counter -count=1
  • go test -tags=cmd_go_bootstrap cmd/internal/telemetry/counter -count=1
  • git go-patch extract successfully reapplied the complete release patch stack

@gdams
George Adams (gdams) requested a review from a team as a code owner October 13, 2026 08:08
Copilot AI balanced review requested due to automatic review settings October 13, 2026 08:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The backport matches the merged implementation and preserves patch-stack consistency.

0 open findings

What changed in this PR

Backports configurable telemetry defaults through Go’s standard environment hierarchy.

Changes:

  • Adds installation, user, and process-level configuration support.
  • Documents precedence and tests user overrides.
  • Patches are happy!
File Description
patches/​0007-Add-appinsights-telemetry.patch Implements configuration, exposure, and tests.
eng/​doc/​Telemetry.md Documents values, overrides, and precedence.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dagood

Davis Goodin (dagood) commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

I'd like Quim Muntal (@qmuntal) to have a look at this and #2570, probably most familiar with telemetry. (Less time to cook vs. #2566.)

@gdams
George Adams (gdams) enabled auto-merge (squash) October 14, 2026 08:55
@gdams
George Adams (gdams) merged commit 3747f80 into microsoft/release-branch.go1.27 Oct 14, 2026
58 checks passed
@gdams
George Adams (gdams) deleted the dev/gdams/backport-telemetry-go1.27 branch October 14, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants