|
| 1 | +# Telemetry |
| 2 | + |
| 3 | +The FastAPI VS Code extension collects anonymous usage data to help us understand how the extension is used and how we can improve it. This document describes exactly what data is collected. No personally identifiable information is collected. No information is shared with third parties. |
| 4 | + |
| 5 | +## How to disable telemetry |
| 6 | + |
| 7 | +You can disable telemetry in two ways: |
| 8 | + |
| 9 | +### Option 1: Disable all VS Code telemetry |
| 10 | + |
| 11 | +1. Open VS Code Settings (File > Preferences > Settings, or `Cmd+,` on macOS) |
| 12 | +2. Search for `telemetry.telemetryLevel` |
| 13 | +3. Set it to `off` |
| 14 | + |
| 15 | +This disables telemetry for VS Code and all extensions that respect this setting, including FastAPI. |
| 16 | + |
| 17 | +### Option 2: Disable only FastAPI telemetry |
| 18 | + |
| 19 | +1. Open VS Code Settings |
| 20 | +2. Search for `fastapi.telemetry.enabled` |
| 21 | +3. Uncheck the box (set to `false`) |
| 22 | + |
| 23 | +This disables only the FastAPI extension's telemetry while leaving other telemetry unchanged. |
| 24 | + |
| 25 | +**Note:** Telemetry is only sent when *both* VS Code's global telemetry (`telemetry.telemetryLevel`) is enabled *and* the extension setting (`fastapi.telemetry.enabled`) is `true`. Disabling either one will stop all telemetry collection. |
| 26 | + |
| 27 | +## What we collect |
| 28 | + |
| 29 | +We collect anonymous usage metrics to improve the extension. We do **not** collect: |
| 30 | +- File paths or file contents |
| 31 | +- Route paths or endpoint names |
| 32 | +- Any code from your project |
| 33 | +- IP addresses (geo-IP is disabled) |
| 34 | + |
| 35 | +**Note:** All events include contextual information: client type (VS Code, Cursor, etc.), OS platform, CPU architecture, extension version, and if available, the installed Python version and versions of related packages (FastAPI, Pydantic, Starlette, Typer, FastAPI CLI, FastAPI Cloud CLI) from your active interpreter. |
| 36 | + |
| 37 | +### Events |
| 38 | + |
| 39 | +| Event | Data | Why | |
| 40 | +|-------|------|-----| |
| 41 | +| Extension activated | Activation duration, success/failure, number of routes/routers/apps discovered, workspace folder count | Helps us understand startup performance, project sizes, and environment compatibility | |
| 42 | +| Extension deactivated | Session duration (time from activation to deactivation) | Helps us understand how long users keep VS Code open with the extension active | |
| 43 | +| Activation failed | Error category (e.g., "parse_error", "wasm_load_error"), failure stage | Helps us debug issues users encounter | |
| 44 | +| Entrypoint detected | Detection duration, method used (config/pyproject/heuristic), success/failure, routes and routers count | Helps us understand which detection methods work best | |
| 45 | +| Tree view visible | _(none)_ | Know if users see the endpoint explorer | |
| 46 | +| Search executed | Number of results, whether user selected a result | Helps us understand search usage | |
| 47 | +| CodeLens provided | Number of test calls found, number matched to routes | Helps us understand CodeLens effectiveness | |
| 48 | +| Routes navigated | Count of navigations (cumulative) | Helps us understand feature usage depth | |
| 49 | +| Routes copied | Count of copies (cumulative) | Helps us understand feature usage depth | |
| 50 | +| CodeLens clicked | Count of clicks (cumulative) | Helps us understand feature usage depth | |
| 51 | + |
| 52 | +### Identifiers |
| 53 | + |
| 54 | +- A random UUID is generated and stored locally in VS Code's extension storage |
| 55 | +- This ID is used solely to count unique users and is not linked to any personal information |
| 56 | + |
| 57 | +## Source code |
| 58 | + |
| 59 | +The telemetry implementation is fully open source. See: |
| 60 | +- [src/utils/telemetry/](src/utils/telemetry/) - All telemetry code |
| 61 | +- [src/utils/telemetry/events.ts](src/utils/telemetry/events.ts) - Event definitions |
0 commit comments