@@ -34,46 +34,73 @@ Signal kinds, which each category groups its events by:
3434
3535Framework-managed envelope fields (wire keys, JSONL):
3636
37- | Field | Meaning |
38- | ----------------- | ------------------------------------------------------------------------------------------- |
39- | ` event_id ` | Unique per event (OTel span id, 16 hex) |
40- | ` event_name ` | The event names below |
41- | ` timestamp ` | ISO 8601 emission time |
42- | ` event_sequence ` | Monotonic per-session counter |
43- | ` schema_version ` | Integer, currently ` 1 ` ; bumped only on breaking wire changes, additive fields never bump it |
44- | ` trace_id ` | Spans and their child events only (OTel trace id, 32 hex) |
45- | ` parent_event_id ` | Phases and span logs only; the parent span's ` event_id ` |
46- | ` error ` | ` { message, type?, code? } ` , only when an error was captured |
47-
48- Session context, stamped on every event under ` context ` :
49-
50- | Field | Source |
51- | -------------------------------------- | ------------------------------------------------------------------------- |
52- | ` extension_version ` | package.json version |
53- | ` machine_id ` | ` vscode.env.machineId ` |
54- | ` session_id ` | Generated per session |
55- | ` os_type ` / ` os_version ` / ` host_arch ` | ` process.platform ` (windows normalized) / ` os.release() ` / ` process.arch ` |
56- | ` platform_name ` / ` platform_version ` | ` vscode.env.appName ` / ` vscode.version ` |
57- | ` deployment_url ` | Set once known via ` setDeploymentUrl ` |
37+ | Field | Meaning |
38+ | ----------------- | ---------------------------------------------------------------------- |
39+ | ` event_id ` | Unique per event (OTel span id, 16 hex) |
40+ | ` event_name ` | The event names below |
41+ | ` timestamp ` | ISO 8601 emission time |
42+ | ` event_sequence ` | Monotonic per-session counter |
43+ | ` deployment_url ` | Deployment active at emit time; empty until set via ` setDeploymentUrl ` |
44+ | ` trace_id ` | Spans and their child events only (OTel trace id, 32 hex) |
45+ | ` parent_event_id ` | Phases and span logs only; the parent span's ` event_id ` |
46+ | ` error ` | ` { message, type?, code? } ` , only when an error was captured |
47+
48+ Session-constant context is written once per file instead of on every row:
49+ the first line of every telemetry file (including rotated ` .N ` segments) is
50+ a header carrying the wire schema version, the sink start time, and the
51+ session context; each row below it implicitly inherits the version and
52+ context.
53+
54+ ``` json
55+ {
56+ "kind" : " header" ,
57+ "schema_version" : 1 ,
58+ "timestamp" : " ..." ,
59+ "context" : {
60+ "extension_version" : " ..." ,
61+ "machine_id" : " ..." ,
62+ "session_id" : " ..." ,
63+ "os_type" : " ..." ,
64+ "os_version" : " ..." ,
65+ "host_arch" : " ..." ,
66+ "platform_name" : " ..." ,
67+ "platform_version" : " ..."
68+ }
69+ }
70+ ```
71+
72+ | Field | Source |
73+ | -------------------------------------- | ------------------------------------------------------------------------------------------- |
74+ | ` schema_version ` | Integer, currently ` 1 ` ; bumped only on breaking wire changes, additive fields never bump it |
75+ | ` timestamp ` | ISO 8601 sink start time; at or before every row's timestamp |
76+ | ` extension_version ` | package.json version |
77+ | ` machine_id ` | ` vscode.env.machineId ` |
78+ | ` session_id ` | Generated per session |
79+ | ` os_type ` / ` os_version ` / ` host_arch ` | ` process.platform ` (windows normalized) / ` os.release() ` / ` process.arch ` |
80+ | ` platform_name ` / ` platform_version ` | ` vscode.env.appName ` / ` vscode.version ` |
5881
5982On OTLP export the context becomes resource attributes (`service.name:
6083coder-vscode-extension` , ` service.version` , ` service.instance.id` , ` host.id`,
6184` host.arch ` , ` os.type ` , ` os.version ` , ` vscode.platform.name ` ,
62- ` vscode.platform.version ` , ` coder.deployment.url ` ) plus per-record provenance
63- (` coder.event.extension_version ` , ` coder.event.session_id ` ,
64- ` coder.event.deployment_url ` ).
85+ ` vscode.platform.version ` , ` coder.deployment.url ` ) on the resource block
86+ holding the producing session's records.
6587
6688## Consuming exports
6789
6890Events buffer on disk as JSONL; nothing leaves the machine on its own. The
6991** Coder: Export Telemetry** command flushes the buffer and writes a chosen
7092date range in one of two formats:
7193
72- - ** JSON** : one file holding an array of the wire-format rows described
73- above, for direct inspection or ad-hoc processing.
94+ - ** JSON** : one file holding an array of self-contained events, each
95+ carrying its full context and schema version, for direct inspection or
96+ ad-hoc processing.
7497- ** OTLP** : a zip of standard OTLP/JSON envelopes (spans in ` traces.json ` ,
7598 logs in ` logs.json ` , metric events as data points in ` metrics.json ` ) plus
76- a ` manifest.json ` describing the export. Feed these to any OTel-compatible
99+ a ` manifest.json ` describing the export. Each envelope holds one resource
100+ block per producing session and UTC date, carrying that session's context
101+ as resource attributes; within a block, metric data points are grouped
102+ under one ` metrics[] ` entry per metric name and unit, and cumulative
103+ counters restart at the block boundary. Feed these to any OTel-compatible
77104 tool that ingests OTLP/JSON, such as an OpenTelemetry Collector pipeline or
78105 your observability backend's import tooling.
79106
@@ -271,6 +298,7 @@ Emitted by `DiagnosticTelemetry` around each diagnostic command.
271298| ` interval.count ` (measurement) | speed test only |
272299| ` throughput_mbits ` (measurement) | speed test only |
273300| ` event.count ` (measurement) | telemetry export only |
301+ | ` file.skipped_count ` (measurement) | telemetry export only; unreadable files skipped, omitted at zero |
274302
275303## Deployment
276304
@@ -358,9 +386,10 @@ Emitted by `SshTelemetry`.
358386
359387#### ` ssh.network.sampled `
360388
361- Tunnel network sample. Emitted on a p2p flip, a preferred-DERP change, a
362- meaningful latency change (at least 25 ms or 20 %), or a roughly 60 s
363- heartbeat.
389+ Tunnel network sample. Emitted on a roughly 60 s heartbeat, or on a p2p
390+ flip, a preferred-DERP change, or a meaningful latency change (at least
391+ 25 ms and at least 20 %). Change-triggered emissions are limited to one per
392+ 15 s; a change that persists past that cooldown is emitted when it expires.
364393
365394| Attribute | Values |
366395| ------------------------------ | ------------------------------------------------------------------ |
@@ -380,13 +409,13 @@ Emitted by `HttpRequestsTelemetry`, which lives with the HTTP logging in
380409` src/logging ` . A per-minute rollup of REST traffic, one event per method and
381410route bucket.
382411
383- | Attribute | Values |
384- | ---------------------------------------------------------------------- | ------------------------------------------------------------------- |
385- | ` method ` | HTTP method |
386- | ` route ` | normalized route (ids replaced by placeholders) |
387- | ` window_seconds ` (measurement) | actual window length |
388- | ` count.1xx ` through ` count.5xx ` , ` count.network_error ` (measurements) | export as cumulative counters with unit ` {request} ` |
389- | ` duration.p50_ms ` , ` duration.p95_ms ` , ` duration.p99_ms ` (measurements) | export as gauges (` http.requests.duration.p50 ` etc.) with unit ` ms ` |
412+ | Attribute | Values |
413+ | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
414+ | ` method ` | HTTP method |
415+ | ` route ` | normalized route (ids replaced by placeholders) |
416+ | ` window_seconds ` (measurement) | actual window length |
417+ | ` count.1xx ` through ` count.5xx ` , ` count.network_error ` (measurements) | omitted when 0; export as cumulative counters with unit ` {request} ` |
418+ | ` duration.p50_ms ` , ` duration.p95_ms ` , ` duration.p99_ms ` (measurements) | omitted when no request carried timing metadata; export as gauges (` http.requests.duration.p50 ` etc.) with unit ` ms ` |
390419
391420## WebSocket connections
392421
0 commit comments