{"record":{"id":"63ecb30bb00fcf78","repo":"denoland/deno","slug":"vsock-is-not-supported-on-this-platform","errorCode":null,"errorMessage":"vsock is not supported on this platform","messagePattern":"vsock is not supported on this platform","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ext/telemetry/lib.rs","lineNumber":807,"sourceCode":"    inner: Client<Connector, Full<Bytes>>,\n    timeout: Duration,\n  }\n\n  impl HyperClient {\n    fn build_connector(\n      sys: &impl FsRead,\n    ) -> deno_core::anyhow::Result<Connector> {\n      let connector = if let Some(tunnel) = get_tunnel() {\n        Connector::Tunnel(tunnel.clone())\n      } else if let Ok(addr) = std::env::var(\"OTEL_DENO_VSOCK\") {\n        #[cfg(not(any(\n          target_os = \"android\",\n          target_os = \"linux\",\n          target_os = \"macos\"\n        )))]\n        {\n          let _ = addr;\n          deno_core::anyhow::bail!(\"vsock is not supported on this platform\")\n        }\n\n        #[cfg(any(\n          target_os = \"android\",\n          target_os = \"linux\",\n          target_os = \"macos\"\n        ))]\n        {\n          let Some((cid, port)) = addr.split_once(':') else {\n            deno_core::anyhow::bail!(\"invalid vsock addr\");\n          };\n          let cid = if cid == \"-1\" { u32::MAX } else { cid.parse()? };\n          let port = port.parse()?;\n          let addr = VsockAddr::new(cid, port);\n          Connector::Vsock(addr)\n        }\n      } else {\n        let ca_certs = match std::env::var(\"OTEL_EXPORTER_OTLP_CERTIFICATE\") {","sourceCodeStart":789,"sourceCodeEnd":825,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/telemetry/lib.rs#L789-L825","documentation":"When OTEL_DENO_VSOCK is set, the OTLP telemetry exporter tries to send over an AF_VSOCK socket (host-to-VM channel used on microVM platforms). The vsock connector only compiles for android, linux and macos; on any other platform the code bails with this message before the address is even parsed.","triggerScenarios":"Running with OTEL telemetry enabled and OTEL_DENO_VSOCK present in the environment on a non-android/linux/macos platform — in practice Windows.","commonSituations":"A shared .env file or CI matrix that exports OTEL_DENO_VSOCK unconditionally across Linux VM runners and Windows/macOS runners; copying cloud config from a Linux deployment to a local Windows dev box.","solutions":["Unset OTEL_DENO_VSOCK on platforms without vsock: `Remove-Item Env:OTEL_DENO_VSOCK` (PowerShell) or `env -u OTEL_DENO_VSOCK deno ...`","Gate the variable per-platform in CI (set it only on linux/android/macos jobs)","Use a regular HTTP OTLP endpoint (OTEL_EXPORTER_OTLP_ENDPOINT) on unsupported platforms"],"exampleFix":"# before — Windows CI fails at telemetry init\n$env:OTEL_DENO_VSOCK = \"2:4317\"\ndeno run --unstable-otel main.ts\n\n# after — unset on unsupported platforms\nRemove-Item Env:OTEL_DENO_VSOCK\ndeno run --unstable-otel main.ts","handlingStrategy":"validation","validationCode":"# set the vsock endpoint only on supported platforms\ncase \"$(uname -s)\" in\n  Linux|Darwin|Android) export OTEL_DENO_VSOCK=\"2:4317\";;\n  *) unset OTEL_DENO_VSOCK || true;;\nesac\ndeno run --unstable-otel main.ts","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep OTEL_DENO_VSOCK out of .env files shared by cross-platform teams","Document the variable as android/linux/macos-only in deployment configs","Default to HTTP OTLP endpoints; opt into vsock per deployment target"],"tags":["telemetry","otel","otlp","vsock","platform","env-vars"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}