1# Telemetry in Zed
2
3**Up to date with v0.112.0**
4
5Zed collects anonymous telemetry data to help the team understand how people are using the application and to see what sort of issues they are experiencing.
6
7## Dataflow
8
9Telemetry is sent from the application to our servers. Data is proxied through our servers to enable us to easily switch analytics services. We currently use:
10
11- [Axiom](https://axiom.co): Cloud-monitoring service - stores diagnostic events
12- [Clickhouse](https://clickhouse.com): Business Intelligence platform - stores both diagnostic and metric events
13- [Metabase](https://www.metabase.com): Dashboards - dashboards built around data pulled from Clickhouse
14
15## Types of Telemetry
16
17### Diagnostics
18
19Diagnostic events include debug information (stack traces) from crash reports. Reports are sent on the first application launch after the crash occurred. We've built dashboards that allow us to visualize the frequency and severity of issues experienced by users. Having these reports sent automatically allows us to begin implementing fixes without the user needing to file a report in our issue tracker. The plots in the dashboards also give us an informal measurement of the stability of Zed.
20
21When a panic occurs, the following data is sent:
22
23#### PanicRequest
24
25- `panic`: The panic data
26- `token`: An identifier that is used to authenticate the request on zed.dev
27
28#### Panic
29
30- `thread`: The name of the thread that panicked
31- `payload`: The panic message
32- `location_data`: The location of the panic
33 - `file`
34 - `line`
35- `backtrace`: The backtrace of the panic
36- `app_version`: Zed's app version
37- `release_channel`: Zed's release channel
38 - `stable`
39 - `preview`
40 - `dev`
41- `os_name`: The name of your operating system
42- `os_version`: The version of your operating system
43- `architecture`: The architecture of your CPU
44- `panicked_on`: The time that the panic occurred
45- `installation_id`: An identifier that is unique to each installation of Zed (this differs for stable, preview, and dev builds)
46- `session_id`: An identifier that is unique to each Zed session (this differs for each time you open Zed)
47
48### Metrics
49
50Zed also collects metric information based on user actions. Metric events are reported over HTTPS, and requests are rate-limited to avoid using significant network bandwidth. All data remains anonymous, and can't be related to specific Zed users.
51
52The following data is sent:
53
54#### ClickhouseEventRequestBody
55
56- `token`: An identifier that is used to authenticate the request on zed.dev
57- `installation_id`: An identifier that is unique to each installation of Zed (this differs for stable, preview, and dev builds)
58- `session_id`: An identifier that is unique to each Zed session (this differs for each time you open Zed)
59- `is_staff`: A boolean that indicates whether the user is a member of the Zed team or not
60- `app_version`: Zed's app version
61- `os_name`: The name of your operating system
62- `os_version`: The version of your operating system
63- `architecture`: The architecture of your CPU
64- `release_channel`: Zed's release channel
65 - `stable`
66 - `preview`
67 - `dev`
68- `events`: A vector of `ClickhouseEventWrapper`s
69
70#### ClickhouseEventWrapper
71
72- `signed_in`: A boolean that indicates whether the user is signed in or not
73- `event`: An enum, where each variant can be one of the following `ClickhouseEvent` variants:
74
75#### ClickhouseEvent
76
77- `editor`
78 - `operation`: The editor operation that was performed
79 - `open`
80 - `save`
81 - `file_extension`: The extension of the file that was opened or saved
82 - `vim_mode`: A boolean that indicates whether the user is in vim mode or not
83 - `copilot_enabled`: A boolean that indicates whether the user has copilot enabled or not
84 - `copilot_enabled_for_language`: A boolean that indicates whether the user has copilot enabled for the language of the file that was opened or saved
85 - `milliseconds_since_first_event`: Duration of time between this event's timestamp and the timestamp of the first event in the current batch
86- `copilot`
87 - `suggestion_id`: The ID of the suggestion
88 - `suggestion_accepted`: A boolean that indicates whether the suggestion was accepted or not
89 - `file_extension`: The file extension of the file that was opened or saved
90 - `milliseconds_since_first_event`: Same as above
91- `call`
92 - `operation`: The call operation that was performed
93 - `accept incoming`
94 - `decline incoming`
95 - `disable microphone`
96 - `disable screen share`
97 - `enable microphone`
98 - `enable screen share`
99 - `hang up`
100 - `invite`
101 - `join channel`
102 - `open channel notes`
103 - `share project`
104 - `unshare project`
105 - `room_id`: The ID of the room
106 - `channel_id`: The ID of the channel
107 - `milliseconds_since_first_event`: Same as above
108- `assistant`
109 - `conversation_id`: The ID of the conversation (for panel events only)
110 - `kind`: An enum with the following variants:
111 - `panel`
112 - `inline`
113 - `model`: The model that was used
114 - `milliseconds_since_first_event`: Same as above
115- `cpu`
116 - `usage_as_percentage`: The CPU usage
117 - `core_count`: The number of cores on the CPU
118 - `milliseconds_since_first_event`: Same as above
119- `memory`
120 - `memory_in_bytes`: The amount of memory used in bytes
121 - `virtual_memory_in_bytes`: The amount of virtual memory used in bytes
122 - `milliseconds_since_first_event`: Same as above
123- `app`
124 - `operation`: The app operation that was performed
125 - `first open`
126 - `open`
127 - `close`
128 - `milliseconds_since_first_event`: Same as above
129
130You can audit the metrics data that Zed has reported by running the command `zed: open telemetry log` from the command palette, or clicking `Help > View Telemetry Log` in the application menu.
131
132### Configuring Telemetry Settings
133
134You have full control over what data is sent out by Zed. To enable or disable some or all telemetry types, open your `settings.json` file via `zed: open settings` from the command palette. Insert and tweak the following:
135
136```json
137"telemetry": {
138 "diagnostics": false,
139 "metrics": false
140},
141```
142
143The telemetry settings can also be configured via the `welcome` screen, which can be invoked via the `workspace: welcome` action in the command palette.
144
145### Concerns and Questions
146
147If you have concerns about telemetry, please feel free to open issues in our [Zed repository](https://github.com/zed-industries/zed/issues/new/choose).