Skip to content

Commit

Permalink
_content/doc: update telemetry documentation now that 1.23 is released
Browse files Browse the repository at this point in the history
Update the telemetry documentation to suggest the `go telemetry`
subcommand for managing telemetry configuration, rather than the
`gotelemetry` command.

Also make it a little more prominent how to revert to local mode.

Change-Id: I6e2353223fe9ef49002eda953ad8d3c277196891
Reviewed-on: https://go-review.googlesource.com/c/website/+/610315
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
findleyr authored and gopherbot committed Sep 3, 2024
1 parent 3430e88 commit e264570
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions _content/doc/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,22 @@ This page explains how Go telemetry works, in some detail. For quick answers to
frequently asked questions, see the [FAQ](#faq).

<div class="DocInfo">
To <strong>opt in</strong> to uploading telemetry data to the Go team, run:
Using Go 1.23 or later, to <strong>opt in</strong> to uploading telemetry data
to the Go team, run:
<pre>
go run golang.org/x/telemetry/cmd/gotelemetry@latest on
go telemetry on
</pre>
To completely disable telemetry, including local collection, run:
<pre>
go run golang.org/x/telemetry/cmd/gotelemetry@latest off
go telemetry off
</pre>
Starting with Go 1.23, this can also be done with the <code>go telemetry</code>
subcommand. See <a href="#config">Configuration</a> for more details.
To revert to the default mode of local-only telemetry, run:
<pre>
go telemetry local
</pre>
Prior to Go 1.23, this can also be done with the
<code>golang.org/x/telemetry/cmd/gotelemetry</code> command. See <a
href="#config">Configuration</a> for more details.
</div>

## Overview {#overview}
Expand Down Expand Up @@ -116,28 +122,24 @@ _mode_. The possible values for `mode` are `local` (the default), `on`, or
[sampling](#uploads).
- When `mode` is `off`, data is neither collected nor uploaded.

The [`gotelemetry`](/pkg/golang.org/x/telemetry/cmd/gotelemetry) command
configures the telemetry mode and manages local telemetry data. Use this
command to install it:
With Go 1.23 or later, the following commands interact with the telemetry mode:

- `go telemetry`: see the current mode.
- `go telemetry on`: set the mode to `on`.
- `go telemetry off`: set the mode to `off`.
- `go telemetry local`: set the mode to `local`.

The [`gotelemetry`](/pkg/golang.org/x/telemetry/cmd/gotelemetry) command can
also be used to configure the telemetry mode, as well as to inspect local
telemetry data. Use this command to install it:

```
go install golang.org/x/telemetry/cmd/gotelemetry@latest
```

The following commands interact with the telemetry mode:

- `gotelemetry local`: set the mode to `local`.
- `gotelemetry on`: set the mode to `on`.
- `gotelemetry off`: set the mode to `off`.
- `gotelemetry env`: see the current mode.

For the complete usage information of the `gotelemetry` command line tool,
see its [package documentation](/pkg/golang.org/x/telemetry/cmd/gotelemetry).

Starting with Go 1.23, the telemetry mode can also be managed with the
`go telemetry` subcommand. Telemetry may also be enabled by accepting an
[IDE prompt](#ide).

## Counters {#counters}

As mentioned above, Go telemetry is instrumented via _counters_. Counters come
Expand Down

0 comments on commit e264570

Please sign in to comment.