Skip to content

Commit b2f8b4b

Browse files
committed
add telemetry commands and update existing
1 parent dc84e08 commit b2f8b4b

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

src/content/docs/pages/functions/wrangler-configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Inheritable keys are configurable at the top-level, and can be inherited (or ove
296296

297297
- `send_metrics` <Type text="boolean" /> <MetaInfo text="optional" />
298298

299-
- Whether Wrangler should send usage metrics to Cloudflare for this project.
299+
- Whether Wrangler should send usage metrics to Cloudflare for this project. Defaults to `true`. You can learn more about this in our [data policy](https://github.com/cloudflare/workers-sdk/tree/main/telemetry.md).
300300

301301
- `limits` Limits optional
302302

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Wrangler offers a number of commands to manage your Cloudflare Workers.
4141
- [`dispatch-namespace`](#dispatch-namespace) - Interact with a [dispatch namespace](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dispatch-namespace).
4242
- [`mtls-certificate`](#mtls-certificate) - Manage certificates used for mTLS connections.
4343
- [`types`](#types) - Generate types from bindings and module rules in configuration.
44+
- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage telemetry
4445

4546
:::note
4647

@@ -2585,3 +2586,47 @@ The minimum required Wrangler version to use this command is 3.66.0.
25852586
- A custom path must have a `d.ts` extension.
25862587

25872588
<Render file="wrangler-commands/global-flags" product="workers" />
2589+
2590+
---
2591+
2592+
## `telemetry`
2593+
2594+
Cloudflare collects anonymous usage data to improve Wrangler. You can learn more about this in our [data policy](https://github.com/cloudflare/workers-sdk/tree/main/telemetry.md).
2595+
2596+
You can opt-out of sharing telemetry data at any time using these commands.
2597+
2598+
### `disable`
2599+
2600+
Disable telemetry collection for Wrangler.
2601+
2602+
```txt
2603+
wrangler telemetry disable
2604+
```
2605+
2606+
:::note
2607+
2608+
You can also disable telemetry collection on a specific project by setting the environment variable `WRANGLER_SEND_METRICS=false`.
2609+
2610+
:::
2611+
2612+
### `enable`
2613+
2614+
Enable telemetry collection for Wrangler.
2615+
2616+
```txt
2617+
wrangler telemetry enable
2618+
```
2619+
2620+
:::note
2621+
2622+
You can also enable telemetry for a specific project by setting the environment variable `WRANGLER_SEND_METRICS=true`.
2623+
2624+
:::
2625+
2626+
### `status`
2627+
2628+
Check whether telemetry collection is currently enabled.
2629+
2630+
```txt
2631+
wrangler telemetry status
2632+
```

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Top-level keys apply to the Worker as a whole (and therefore all environments).
6969

7070
- `send_metrics` <Type text="boolean" /> <MetaInfo text="optional" />
7171

72-
- Whether Wrangler should send usage metrics to Cloudflare for this project.
72+
- Whether Wrangler should send usage metrics to Cloudflare for this project. Defaults to `true`. You can learn more about this in our [data policy](https://github.com/cloudflare/workers-sdk/tree/main/telemetry.md).
7373

7474
- `site` <Type text="object" /> <MetaInfo text="optional deprecated" />
7575

src/content/docs/workers/wrangler/system-environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Wrangler supports the following environment variables:
4040

4141
* `WRANGLER_SEND_METRICS` <Type text="string" /> <MetaInfo text="optional" />
4242

43-
* Options for this are `true` and `false`, the default behavior is `false`.
43+
* Options for this are `true` and `false`, the default behavior is `true`. Controls whether Wrangler can send anonymous usage metrics to Cloudflare for this project. You can learn more about this in our [data policy](https://github.com/cloudflare/workers-sdk/tree/main/telemetry.md).
4444

4545
* `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>`<Type text="string" /> <MetaInfo text="optional" />
4646

0 commit comments

Comments
 (0)