Skip to content
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

[wrangler]: add wrangler telemetry commands and update existing info on telemetry collection #18350

Open
wants to merge 3 commits into
base: production
Choose a base branch
from

Conversation

emily-shen
Copy link
Contributor

Summary

Wrangler will be enabling telemetry collection by default for new users (see cloudflare/workers-sdk#7291).

This PR documents the new wrangler telemetry enable/disable/status commands that have been added in the process, and updates existing references to telemetry collection in Wrangler, including adding links to our data policy.

Documentation checklist

Copy link

cloudflare-workers-and-pages bot commented Nov 22, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4216eeb
Status: ✅  Deploy successful!
Preview URL: https://4c889c59.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://emily-wrangler-telemetry-cmd.cloudflare-docs-7ou.pages.dev

View logs

@@ -296,7 +296,7 @@ Inheritable keys are configurable at the top-level, and can be inherited (or ove

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

- 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).
Copy link
Member

Choose a reason for hiding this comment

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

How about this?

Fallbacks to the current wrangler metrics status if not defined. You can learn more about this in our data policy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems a bit sneaky to hide that its on by default behind an extra click 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I'm just worrying if users might come across this and think they have to set sendMetrics = false to turn it off, especially if we prefer them using the telemetry command 🤔

src/content/docs/workers/wrangler/commands.mdx Outdated Show resolved Hide resolved
@@ -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
Copy link
Contributor

@lrapoport-cf lrapoport-cf Nov 22, 2024

Choose a reason for hiding this comment

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

Suggested change
- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage telemetry
- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage data.

Copy link
Contributor

@lrapoport-cf lrapoport-cf Nov 22, 2024

Choose a reason for hiding this comment

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

or another option: "Manage Wrangler's collection of anonymous usage data"


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.
Copy link
Contributor

@lrapoport-cf lrapoport-cf Nov 22, 2024

Choose a reason for hiding this comment

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

Suggested change
You can opt-out of sharing telemetry data at any time using these commands.
You can manage sharing usage data at any time using these commands.

just trying to reduce the different ways we talk about this. feel like maybe we should keep language to "usage data" as what we collect and "telemetry" as the concept


* The default value is `"https://api.cloudflare.com/client/v4"`.
- 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).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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).


- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

should we specify here that "log" level will print telemetry data?


### `status`

Check whether telemetry collection is currently enabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we should note here that it's a function of global setting, WRANGLER_SEND_METRICS, and send_metrics, and then point to the data policy, where it's specified the priority of the parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.