{"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":"exception","errorClass":"AnyError","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/9ad36f7a2cce60488e6ec52283efb32efddaf93a/ext/telemetry/lib.rs#L789-L825","documentation":"Deno's OpenTelemetry OTLP connector can export telemetry over AF_VSOCK (guest-host sockets used in microVMs like Firecracker/gVisor) when `OTEL_DENO_VSOCK` is set. The vsock code is only compiled for android/linux/macos; on any other target — notably Windows — merely having the variable present makes the connector builder bail before telemetry starts.","triggerScenarios":"Running Deno on Windows with `OTEL_DENO_VSOCK` present in the environment while telemetry is in use. The value does not matter on unsupported platforms; even an empty string triggers the bail (on supported platforms an empty string instead fails the cid:port parse).","commonSituations":"Environment blocks copied from Linux VM/microVM configs (e.g. `OTEL_DENO_VSOCK=3:4317` for a Firecracker guest) reused on a Windows dev box or CI runner; shared .env files applied across platforms.","solutions":["Unset the variable on Windows: `Remove-Item Env:OTEL_DENO_VSOCK` (or remove it from the .env/CI matrix for Windows jobs).","Use standard HTTP/gRPC OTLP export on Windows: set `OTEL_EXPORTER_OTLP_ENDPOINT` instead.","Keep `OTEL_DENO_VSOCK` only in Linux/macOS/Android deploy targets that actually provide AF_VSOCK."],"exampleFix":"# before (PowerShell on Windows)\n$env:OTEL_DENO_VSOCK = '3:4317'\ndeno run --otel app.ts\n# error: vsock is not supported on this platform\n\n# after\nRemove-Item Env:OTEL_DENO_VSOCK\n$env:OTEL_EXPORTER_OTLP_ENDPOINT = 'http://localhost:4317'\ndeno run --otel app.ts","handlingStrategy":"validation","validationCode":"// TypeScript/Deno: scrub platform-specific env before spawning\nif (Deno.build.os === \"windows\" && Deno.env.has(\"OTEL_DENO_VSOCK\")) {\n  Deno.env.delete(\"OTEL_DENO_VSOCK\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Scope OTEL_DENO_VSOCK to Linux/macOS/Android deploy targets only in CI matrices.","Audit shared .env files for unix-only variables before reuse on Windows.","Default Windows telemetry to OTEL_EXPORTER_OTLP_ENDPOINT (HTTP/gRPC)."],"tags":["telemetry","opentelemetry","vsock","windows","environment"],"backgroundTag":"unsupported-platform","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}