-
Notifications
You must be signed in to change notification settings - Fork 46
telemetry: add msgo/ci counter #2314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Telemetry in the Microsoft build of Go | ||
|
|
||
| The Microsoft build of Go collects opt-out (enabled by default) toolset telemetry. | ||
| Telemetry is sent to Microsoft via Azure Application Insights when `go build`, `go install`, or `go run` is executed. | ||
| No telemetry is collected for other `go` subcommands (e.g. `go test`, `go vet`, `go fmt`). | ||
|
|
||
| For the blog post announcing this feature, see [Microsoft Go Telemetry](https://devblogs.microsoft.com/go/microsoft-go-telemetry/). | ||
|
|
||
| ## What is collected | ||
|
|
||
| All telemetry data consists of **counters** — simple event names that are incremented. | ||
| No source code, file paths, module contents, or personally identifiable information is collected. | ||
| Each telemetry session is assigned a random session ID that cannot be linked back to a user. | ||
|
|
||
| The counters collected are defined in the [telemetry upload configuration](/go/src/cmd/vendor/github.com/microsoft/go-infra/telemetry/config/config.json) and are listed below. | ||
|
|
||
| ### Invocation counter | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `go/invocations` | Incremented once per `go` command invocation. | | ||
|
|
||
| ### Subcommand | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `go/subcommand:{build,install,run}` | Which subcommand was used. | | ||
|
|
||
| ### Target platform | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `go/platform/target/port:<GOOS>-<GOARCH>` | The target platform port (e.g. `linux-amd64`, `windows-arm64`). | | ||
| | `go/cgo:{enabled,disabled}` | Whether cgo was enabled for the build. | | ||
|
|
||
| ### GOEXPERIMENT settings | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `go/goexperiment:<name>` | Each active `GOEXPERIMENT` value that differs from the baseline. Only Microsoft-specific experiments are uploaded: `systemcrypto`, `nosystemcrypto`, `opensslcrypto`, `cngcrypto`, `darwincrypto`, `ms_nocgo_opensslcrypto`, and `ms_tls_config_schannel`. | | ||
|
|
||
| ### CI environment detection | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `msgo/ci:<provider>` | Detected CI provider, if any. Values: `azdo`, `github`, `gitlab`, `appveyor`, `travis`, `circleci`, `aws_codebuild`, `jenkins`, `teamcity`, `google_cloud_build`. Detection is based on well-known environment variables set by each CI system. | | ||
|
|
||
| ### System cryptography | ||
|
|
||
| | Counter | Description | | ||
| |---|---| | ||
| | `msgo/systemcrypto:{enabled,disabled}` | Whether the system cryptography backend is enabled on platforms that support it. | | ||
|
|
||
| ## What is NOT collected | ||
|
|
||
| - No source code or file contents. | ||
| - No file paths from the local file system. | ||
| - No environment variable values (only the presence of specific CI-related variables is checked). | ||
| - No network or authentication information. | ||
| - No personally identifiable information (PII). | ||
|
|
||
| ## How to opt out | ||
|
|
||
| Set the `MS_GOTOOLCHAIN_TELEMETRY_ENABLED` environment variable to `0`. | ||
|
|
||
| This completely disables Microsoft telemetry collection. When disabled, no data is sent to Application Insights. | ||
|
|
||
| > [!NOTE] | ||
| > This setting only controls Microsoft-specific telemetry. The upstream Go toolchain has its own [telemetry system](https://go.dev/doc/telemetry) controlled separately via `go telemetry`. | ||
|
|
||
| ## Privacy | ||
|
|
||
| Microsoft's privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. | ||
|
|
||
| See the [Data Collection policy](/README.md#data-collection) in the repository README for more information. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.