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.
Elysia 1.4+ on Bun 1.3.x, running .ts or .js files directlyUse --preload @rasputin-ai/elysia/instrument/bun.
Elysia 1.4+ on Node.js 22.15 or newer, unbundled ESM/CJSUse rasputin-instrument, or --import @rasputin-ai/elysia/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.
Serverless and edge runtimes (Lambda, Vercel, Cloudflare Workers, Deno, and similar)Not supported. Rasputin needs a long-running Node or Bun process.

Tested on Bun 1.3.13, Node 24.19.0, and Elysia 1.4.28 (22.15+ minimum) as a long-running process. Without auto-instrumentation, use execution.createScope() and execution.trace().

Next: Continue to instrumentation & executions