The `hud-sdk` package provides a lightweight, low-overhead runtime sensor for Node.js applications, designed to capture real-time, function-level behavior directly from production environments. It observes performance characteristics, error behavior, and execution patterns without requiring manual instrumentation, logs, or dashboards. The SDK integrates with various developer tools, including IDEs and CI/CD pipelines, and is specifically optimized for AI-assisted development workflows (e.g., GitHub Copilot, Cursor) to ensure AI-generated code is production-safe. Current stable version is 1.8.3, with frequent updates indicated by its last publish date. It differentiates itself by offering continuous visibility directly in the developer's IDE, focusing on high-fidelity, function-level data, and adhering to strict security and privacy standards (SOC 2 Type II, ISO 27001, GDPR compliance), transmitting only anonymized metadata.
npm install hud-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes the Hud Node.js SDK for runtime monitoring and demonstrates a basic Express application whose routes and errors will be automatically instrumented and monitored by Hud. It requires a `HUD_API_KEY` environment variable.
Ensure `import { register } from 'hud-sdk';` and its subsequent `register()` call are the very first executable lines in your application's main entry file (e.g., `src/index.ts` or `app.js`).Refer to the official Hud documentation for the compatibility matrix and upgrade your Node.js runtime to a supported version. Restart your service after the update.
Verify network connectivity to `https://api-prod.hud.io`, check proxy/firewall settings, and ensure any custom CA certificates are correctly configured in your Node.js environment (e.g., via `NODE_EXTRA_CA_CERTS`).
Run `ts-node` with `--transpileOnly` flag (e.g., `npx ts-node --transpileOnly index.ts`), set `TS_NODE_TRANSPILE_ONLY=true` environment variable, or configure it programmatically. Also, ensure `ts-node` is installed locally in your project dependencies (`npm install ts-node`).
If this occurs, consider reducing the number of instrumented functions by excluding certain modules if your application is exceptionally large or complex. Consult Hud support for guidance on configuring instrumentation scope.
Check the Hud SDK's compatibility matrix and upgrade your Node.js runtime to a supported version, then restart your service.
Verify outbound network connectivity from your runtime host to `https://api-prod.hud.io`. Check firewall, proxy settings, and ensure custom SSL certificates are trusted by Node.js.
Reduce the scope of instrumentation, potentially by configuring the SDK to exclude specific modules or paths. Consult Hud documentation or support for configuration options to manage instrumentation.
Ensure `register()` is called at the very beginning of your application. Invoke your HTTP endpoints to generate traffic. Check Hud's support matrix for your specific HTTP framework.
Install `ts-node` locally in your project (`npm install ts-node`). Ensure `npx ts-node` or `node --require ts-node/register` is used to run your TypeScript application, rather than a globally installed `ts-node` or other problematic setups.
No dependency data recorded yet.