Runtime recorder
Record calls, arguments, and returns inside scoped executions. Rasputin saves that trace when the execution fails, or when you use Capture for the next matching executions.
How it works
An execution is one scoped run of
work in your app. Open it with execution.createScope() for an HTTP handler, a queue
worker, a cron task, or any other entrypoint you define. Inside that scope, Rasputin records
function calls, arguments, return values, and exceptions.
When the execution fails, Rasputin attaches that recording to the error. To record healthy runs too, open Executions, use Capture, and save the next matching executions.
Rasputin must instrument your functions
to see those calls. Usually that means auto-instrumentation: run rasputin-instrument on compiled output, or use bun --preload … / node --import … when you run TypeScript directly.
Rasputin records while your process is running. Use it on a long-running Node or Bun server. It is not built for serverless platforms that freeze or exit after each request.
See auto-instrumentation support before you change build or start scripts. If auto-instrumentation is not an option, see Instrumentation & executions for manual instrumentation and scoping.
What you need to set up
Two steps.
1. Instrument functions
Enable auto-instrumentation, or mark functions with execution.trace(). In production, run rasputin-instrument on compiled output.
2. Scope an execution
Hono scopes each HTTP request for you. Wrap every other entrypoint with execution.createScope().
Where to go next
- Check auto-instrumentation support for your runtime and build.
- Follow Instrumentation & executions to instrument, scope work, and tune the recorder.
