From b2f8b4bdf356872650e2f9451b9948d6cc487721 Mon Sep 17 00:00:00 2001
From: emily-shen <69125074+emily-shen@users.noreply.github.com>
Date: Fri, 22 Nov 2024 14:31:44 +0000
Subject: [PATCH 1/3] add telemetry commands and update existing
---
.../functions/wrangler-configuration.mdx | 2 +-
.../docs/workers/wrangler/commands.mdx | 45 +++++++++++++++++++
.../docs/workers/wrangler/configuration.mdx | 2 +-
.../wrangler/system-environment-variables.mdx | 2 +-
4 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/src/content/docs/pages/functions/wrangler-configuration.mdx b/src/content/docs/pages/functions/wrangler-configuration.mdx
index 63ea6b910290d8c..b16eb72dcb0e556 100644
--- a/src/content/docs/pages/functions/wrangler-configuration.mdx
+++ b/src/content/docs/pages/functions/wrangler-configuration.mdx
@@ -296,7 +296,7 @@ Inheritable keys are configurable at the top-level, and can be inherited (or ove
- `send_metrics`
- - Whether Wrangler should send usage metrics to Cloudflare for this project.
+ - 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).
- `limits` Limits optional
diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx
index c0e55b0ead6534b..45fe393b0d43a93 100644
--- a/src/content/docs/workers/wrangler/commands.mdx
+++ b/src/content/docs/workers/wrangler/commands.mdx
@@ -41,6 +41,7 @@ Wrangler offers a number of commands to manage your Cloudflare Workers.
- [`dispatch-namespace`](#dispatch-namespace) - Interact with a [dispatch namespace](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dispatch-namespace).
- [`mtls-certificate`](#mtls-certificate) - Manage certificates used for mTLS connections.
- [`types`](#types) - Generate types from bindings and module rules in configuration.
+- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage telemetry
:::note
@@ -2585,3 +2586,47 @@ The minimum required Wrangler version to use this command is 3.66.0.
- A custom path must have a `d.ts` extension.
+
+---
+
+## `telemetry`
+
+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).
+
+You can opt-out of sharing telemetry data at any time using these commands.
+
+### `disable`
+
+Disable telemetry collection for Wrangler.
+
+```txt
+wrangler telemetry disable
+```
+
+:::note
+
+You can also disable telemetry collection on a specific project by setting the environment variable `WRANGLER_SEND_METRICS=false`.
+
+:::
+
+### `enable`
+
+Enable telemetry collection for Wrangler.
+
+```txt
+wrangler telemetry enable
+```
+
+:::note
+
+You can also enable telemetry for a specific project by setting the environment variable `WRANGLER_SEND_METRICS=true`.
+
+:::
+
+### `status`
+
+Check whether telemetry collection is currently enabled.
+
+```txt
+wrangler telemetry status
+```
diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx
index 9e5a14721a763de..a6d94a77c0379f8 100644
--- a/src/content/docs/workers/wrangler/configuration.mdx
+++ b/src/content/docs/workers/wrangler/configuration.mdx
@@ -69,7 +69,7 @@ Top-level keys apply to the Worker as a whole (and therefore all environments).
- `send_metrics`
- - Whether Wrangler should send usage metrics to Cloudflare for this project.
+ - 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).
- `site`
diff --git a/src/content/docs/workers/wrangler/system-environment-variables.mdx b/src/content/docs/workers/wrangler/system-environment-variables.mdx
index c46580d427dab7c..48db13e7207f2a6 100644
--- a/src/content/docs/workers/wrangler/system-environment-variables.mdx
+++ b/src/content/docs/workers/wrangler/system-environment-variables.mdx
@@ -40,7 +40,7 @@ Wrangler supports the following environment variables:
* `WRANGLER_SEND_METRICS`
- * Options for this are `true` and `false`, the default behavior is `false`.
+ * 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).
* `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_`
From 2e32bb60d0af21a2e213fa9cc87420b4ae82cd97 Mon Sep 17 00:00:00 2001
From: emily-shen <69125074+emily-shen@users.noreply.github.com>
Date: Mon, 25 Nov 2024 11:22:44 +0000
Subject: [PATCH 2/3] update link + pr feedback
---
.../pages/functions/wrangler-configuration.mdx | 2 +-
src/content/docs/workers/wrangler/commands.mdx | 14 +-------------
.../docs/workers/wrangler/configuration.mdx | 2 +-
.../wrangler/system-environment-variables.mdx | 2 +-
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/content/docs/pages/functions/wrangler-configuration.mdx b/src/content/docs/pages/functions/wrangler-configuration.mdx
index b16eb72dcb0e556..8653b05476a629d 100644
--- a/src/content/docs/pages/functions/wrangler-configuration.mdx
+++ b/src/content/docs/pages/functions/wrangler-configuration.mdx
@@ -296,7 +296,7 @@ Inheritable keys are configurable at the top-level, and can be inherited (or ove
- `send_metrics`
- - 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).
+ - 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/packages/wrangler/telemetry.md).
- `limits` Limits optional
diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx
index 45fe393b0d43a93..c6cdf1278072ab2 100644
--- a/src/content/docs/workers/wrangler/commands.mdx
+++ b/src/content/docs/workers/wrangler/commands.mdx
@@ -2591,7 +2591,7 @@ The minimum required Wrangler version to use this command is 3.66.0.
## `telemetry`
-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).
+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/packages/wrangler/telemetry.md).
You can opt-out of sharing telemetry data at any time using these commands.
@@ -2603,12 +2603,6 @@ Disable telemetry collection for Wrangler.
wrangler telemetry disable
```
-:::note
-
-You can also disable telemetry collection on a specific project by setting the environment variable `WRANGLER_SEND_METRICS=false`.
-
-:::
-
### `enable`
Enable telemetry collection for Wrangler.
@@ -2617,12 +2611,6 @@ Enable telemetry collection for Wrangler.
wrangler telemetry enable
```
-:::note
-
-You can also enable telemetry for a specific project by setting the environment variable `WRANGLER_SEND_METRICS=true`.
-
-:::
-
### `status`
Check whether telemetry collection is currently enabled.
diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx
index a6d94a77c0379f8..8185c88cdc80c75 100644
--- a/src/content/docs/workers/wrangler/configuration.mdx
+++ b/src/content/docs/workers/wrangler/configuration.mdx
@@ -69,7 +69,7 @@ Top-level keys apply to the Worker as a whole (and therefore all environments).
- `send_metrics`
- - 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).
+ - 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/packages/wrangler/telemetry.md).
- `site`
diff --git a/src/content/docs/workers/wrangler/system-environment-variables.mdx b/src/content/docs/workers/wrangler/system-environment-variables.mdx
index 48db13e7207f2a6..d72c3cd86bea078 100644
--- a/src/content/docs/workers/wrangler/system-environment-variables.mdx
+++ b/src/content/docs/workers/wrangler/system-environment-variables.mdx
@@ -40,7 +40,7 @@ Wrangler supports the following environment variables:
* `WRANGLER_SEND_METRICS`
- * 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).
+ * 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/packages/wrangler/telemetry.md).
* `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_`
From 4216eebfe4d53c6135b8d6e135462ff18d06d056 Mon Sep 17 00:00:00 2001
From: emily-shen <69125074+emily-shen@users.noreply.github.com>
Date: Mon, 25 Nov 2024 11:51:55 +0000
Subject: [PATCH 3/3] pr feedback 2
---
src/content/docs/workers/wrangler/commands.mdx | 6 +++---
.../docs/workers/wrangler/system-environment-variables.mdx | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx
index c6cdf1278072ab2..4a13706f3896412 100644
--- a/src/content/docs/workers/wrangler/commands.mdx
+++ b/src/content/docs/workers/wrangler/commands.mdx
@@ -41,7 +41,7 @@ Wrangler offers a number of commands to manage your Cloudflare Workers.
- [`dispatch-namespace`](#dispatch-namespace) - Interact with a [dispatch namespace](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dispatch-namespace).
- [`mtls-certificate`](#mtls-certificate) - Manage certificates used for mTLS connections.
- [`types`](#types) - Generate types from bindings and module rules in configuration.
-- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage telemetry
+- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage data.
:::note
@@ -2593,7 +2593,7 @@ The minimum required Wrangler version to use this command is 3.66.0.
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/packages/wrangler/telemetry.md).
-You can opt-out of sharing telemetry data at any time using these commands.
+You can manage sharing of usage data at any time using these commands.
### `disable`
@@ -2613,7 +2613,7 @@ wrangler telemetry enable
### `status`
-Check whether telemetry collection is currently enabled.
+Check whether telemetry collection is currently enabled. This will resolve the global status set by `wrangler telemetry disable / enable`, the environment variable [`WRANGLER_SEND_METRICS`](/workers/wrangler/system-environment-variables/#supported-environment-variables) and the [`send_metrics`](/workers/wrangler/configuration/#top-level-only-keys) key in `wrangler.toml`.
```txt
wrangler telemetry status
diff --git a/src/content/docs/workers/wrangler/system-environment-variables.mdx b/src/content/docs/workers/wrangler/system-environment-variables.mdx
index d72c3cd86bea078..46f72a49a8166e1 100644
--- a/src/content/docs/workers/wrangler/system-environment-variables.mdx
+++ b/src/content/docs/workers/wrangler/system-environment-variables.mdx
@@ -40,7 +40,7 @@ Wrangler supports the following environment variables:
* `WRANGLER_SEND_METRICS`
- * 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/packages/wrangler/telemetry.md).
+ * Options for this are `true` and `false`. Defaults to `true`. Controls whether Wrangler can send anonymous usage data to Cloudflare for this project. You can learn more about this in our [data policy](https://github.com/cloudflare/workers-sdk/tree/main/packages/wrangler/telemetry.md).
* `WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_`
@@ -52,7 +52,7 @@ Wrangler supports the following environment variables:
* `WRANGLER_LOG`
- * Options for Logging levels are `"none"`, `"error"`, `"warn"`, `"info"`, `"log"` and `"debug"`. Levels are case-insensitive and default to `"log"`. If an invalid level is specified, Wrangler will fallback to the default.
+ * Options for Logging levels are `"none"`, `"error"`, `"warn"`, `"info"`, `"log"` and `"debug"`. Levels are case-insensitive and default to `"log"`. If an invalid level is specified, Wrangler will fallback to the default. Logs can include requests to Cloudflare's API, any usage data being collected, and more verbose error logs.
* `FORCE_COLOR`