{"record":{"id":"b1edbfc4e0863135","repo":"denoland/deno","slug":"invalid-vsock-addr-b1edbf","errorCode":null,"errorMessage":"invalid vsock addr","messagePattern":"invalid vsock addr","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ext/telemetry/lib.rs","lineNumber":817,"sourceCode":"      } 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\") {\n          Ok(path) => vec![sys.fs_read(path)?.into_owned()],\n          _ => vec![],\n        };\n\n        let keys = match (\n          std::env::var(\"OTEL_EXPORTER_OTLP_CLIENT_KEY\"),\n          std::env::var(\"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE\"),\n        ) {\n          (Ok(key_path), Ok(cert_path)) => {\n            let key = sys.fs_read(key_path)?;","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/ext/telemetry/lib.rs#L799-L835","documentation":"The value of OTEL_DENO_VSOCK must be a `cid:port` pair; the code splits on the first colon and rejects values that have none. cid `-1` maps to VMADDR_CID_ANY (u32::MAX); other cids and the port are parsed numerically, with malformed numbers surfacing as separate parse errors via `?`.","triggerScenarios":"Setting OTEL_DENO_VSOCK to a value with no colon: `2 4317`, `vsock://2:4317`, a bare port like `4317`, or a URL-style endpoint copied from OTEL_EXPORTER_OTLP_ENDPOINT.","commonSituations":"Reusing the URL format of the HTTP endpoint variable for the vsock variable; hand-writing Firecracker/microVM configs and dropping the colon; whitespace typos.","solutions":["Use the exact `cid:port` form, e.g. `OTEL_DENO_VSOCK=2:4317`","Use `-1` as the cid for VMADDR_CID_ANY: `OTEL_DENO_VSOCK=-1:4317`","Remove any scheme prefix (`vsock://`) or spaces copied from documentation"],"exampleFix":"# before — no colon separator\nexport OTEL_DENO_VSOCK=\"2 4317\"\n\n# after — cid:port form; -1 means VMADDR_CID_ANY\nexport OTEL_DENO_VSOCK=\"2:4317\"","handlingStrategy":"validation","validationCode":"vsock=\"${OTEL_DENO_VSOCK:-}\"\nif [ -n \"$vsock\" ] && ! printf '%s' \"$vsock\" | grep -Eqx -- '-?[0-9]+:[0-9]+'; then\n  echo \"OTEL_DENO_VSOCK must be cid:port, got: '$vsock'\"; exit 1\nfi\ndeno run --unstable-otel main.ts","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the `cid:port` form with numeric fields only; `-1` means VMADDR_CID_ANY","Do not include a scheme like vsock:// — the variable is not a URL","Add a telemetry startup smoke test in CI to catch env-format mistakes early"],"tags":["telemetry","otel","vsock","env-vars","config-format"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}