Skip to content

Commit

Permalink
draft data policy
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Sep 19, 2024
1 parent 49aabbc commit 791372c
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions packages/create-cloudflare/telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Create-Cloudflare Telemetry

Cloudflare gathers non-user identifying telemetry data about usage of [create-cloudflare](https://www.npmjs.com/package/create-cloudflare), the command-line interface for scaffolding Workers and Pages applications

You can opt out of sharing telemetry data at any time.

## Why are we collecting telemetry data?

Create-Cloudflare Telemetry allows us to better identify roadblocks and bugs and gain visibility on usage of features across all users. It also helps us to add new features to create a better overall experience. We monitor this data to ensure Create-Cloudflare’s consistent growth, stability, usability and developer experience.

- If certain errors are hit more frequently, those bug fixes will be prioritized in future releases
- If certain languages are used more frequently, we will add more templates in this language
- If certain templates are no longer used, they will be removed and replace

## What telemetry data is Cloudflare collecting?

- What command is used as the entrypoint into Create-Cloudflare? (e.g. `npm create cloudflare@latest`, `npm create cloudflare –-template myrepo`)
- Package manager being used (e.g. npm, yarn)
- Which version of Create-Cloudflare is being run (e.g. create-cloudflare 10.8.1)
- Whether projects are renamed
- Sanitized error information (e.g. error type, frequency)
- Number of first time Create-Cloudflare downloads
- What types of templates and languages are most/least popular
- Experience outcome (e.g. deploy project, create locally, or no project creation)
- Total session duration (e.g. 30 seconds, etc.)
- General machine information such as OS Version, CPU architecture (e.g. macOS, x84)

Cloudflare will receive the IP address associated with your machine and such information is handled in accordance with Cloudflare’s [Privacy Policy](https://www.cloudflare.com/privacypolicy/).

**Note**: This list is regularly audited to ensure its accuracy.

## What happens with sensitive data?

Cloudflare takes your privacy seriously and does not collect any sensitive information including: any usernames, raw error logs and stack traces, file names/paths and content of files, and environment variables. Data is never shared with third parties.

## How can I view analytics code?

To view what is being collected while using Create-Cloudflare, provide the environment variable

`CREATE_CLOUDFLARE_TELEMETRY_DEBUG=1` (`CREATE_CLOUDFLARE_TELEMETRY_DEBUG=1 npm create cloudflare`)

Analytics code can be viewed at https://github.com/cloudflare/workers-sdk/tree/main/packages/create-cloudflare/{telemetry}. It is run in the background and will not delay project execution. As a result, when necessary (e.g. no internet connection), it will fail quickly and quietly.

An example of an event sent to Cloudflare might look like:

```json
{
"name": "white-snow-976",
"payload": {
"gitRepo": false,
"language": "typescript",
"template": "hello-world-durable-objects",
"isDeployed": false,
"packageManager": "npm",
"version": "10.8.1",
"errors": {
"errorType1": 3,
"errorType2": 1
},
"sessionStart": "2018-01-10T08:14:00",
"sessionEnd": "2018-01-10T08:14:57",
"OS": "macOS",
"CPU": "x84"
}
}
```

## How can I configure Create-Cloudflare telemetry?

If you would like to disable telemetry, you can run:

```sh
npm create cloudflare telemetry disable
```

Alternatively, you can set an environment variable:

```sh
export CREATE_CLOUDFLARE_TELEMETRY_DISABLE=1
```

If you would like to re-enable telemetry, you can run:

```sh
npm create cloudflare telemetry enable
```

If you would like to check the status of Create-Cloudflare telemetry, you can run:

```sh
npm create cloudflare telemetry status'
```

0 comments on commit 791372c

Please sign in to comment.