Auto-instrumentation support
Auto-instrumentation wraps functions at build or startup. Check this before you change scripts. If
your setup is not listed, use execution.trace() and execution.createScope() as described in Instrumentation & executions.
Where auto-instrumentation works
| Environment | Auto-instrumentation |
|---|---|
| TypeScript compiled to multiple JavaScript files | Run rasputin-instrument on dist after tsc. Keep .js.map next to output. |
| Bun 1.3.x running .ts or .js files directly | Use --preload @rasputin-ai/node/instrument/bun. |
| Node.js 22.15 or newer, unbundled ESM/CJS | Use rasputin-instrument, or --import @rasputin-ai/node/instrument/node. Node 22 and 24 are the supported LTS lines. |
| Single-file bundles (esbuild, tsup, webpack, Vite SSR, Next.js) | Not supported. Use execution.trace(). |
| tsx, custom Node loader stacks, and Node native TypeScript execution | Automatic instrumentation is not supported. |
| Deno and edge runtimes | Not supported. |
Tested on Bun 1.3.13 and Node 24.19.0 (22.15+ minimum). Without auto-instrumentation, use execution.createScope() and execution.trace().
