Skip to content

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

@cloudflare-workers-and-pages
Copy link

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

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ff5e6b
Status: ✅  Deploy successful!
Preview URL: https://839cbf8b.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://emily-wrangler-telemetry-cmd.cloudflare-docs-7ou.pages.dev

View logs

- `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 🤔

@emily-shen emily-shen force-pushed the emily/wrangler-telemetry-cmds branch from e59c9d2 to 2e32bb6 Compare November 25, 2024 11:22

### `status`

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

Choose a reason for hiding this comment

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

Probably a very basic question, but what do we mean by "resolve"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

telemetry could be set at a project or user/global level, so this command 'resolves' the telemetry status given where you've run the command. so if you've globally enabled it with npx wrangler telemetry enable but put in send_metrics=false in a specific projects' config, then running npx wrangler telemetry status while you're in that project folder would say telemetry is disabled.

happy to update if you've got a better way of phrasing it though! :))

@lrapoport-cf lrapoport-cf merged commit 9544d57 into production Dec 6, 2024
12 checks passed
@lrapoport-cf lrapoport-cf deleted the emily/wrangler-telemetry-cmds branch December 6, 2024 16:45
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.