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

EnvironmentAuto-instrumentation
TypeScript compiled to multiple JavaScript filesRun rasputin-instrument on dist after tsc. Keep .js.map next to output.
Bun 1.3.x running .ts or .js files directlyUse --preload @rasputin-ai/node/instrument/bun.
Node.js 22.15 or newer, unbundled ESM/CJSUse 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 executionAutomatic instrumentation is not supported.
Deno and edge runtimesNot supported.

Tested on Bun 1.3.13 and Node 24.19.0 (22.15+ minimum). Without auto-instrumentation, use execution.createScope() and execution.trace().

Next: Continue to instrumentation & executions