Runtime recorder setup
Installation already turns recording on for HTTP requests. Use this page to confirm that and to redact or exclude noisy data.
Enable automatic instrumentation
The Vite plugin wraps your functions so Rasputin can show what ran when an error happened.
Recorded state is kept only while a request is running, and is attached when handleError observes that failure.
Scope each unit of work
rasputinServerHooks already creates one execution
per HTTP request. Do not wrap handle, load, form actions, or +server.ts handlers again.
Configuration
Recording is on by default once the Vite plugin and server hooks are in place. Change these
only to exclude noisy code, redact sensitive fields, or keep less state. Pass them to node().
| Field | Default | What it does |
|---|---|---|
enabled | true | Turns runtime-state capture on or off. |
maxEventsPerExecution | 500 | Maximum events kept for one execution. |
maxCapturedCallsPerFunction | 3 | Detailed successful calls kept before similar calls are summarized. |
maxActiveMemoryBytes | 64 MiB | Maximum recorder memory shared across active executions. |
maxDepth | 3 | Maximum captured value depth. |
maxObjectKeys | 30 | Maximum properties kept from one object. |
maxArrayElements | 20 | Maximum items kept from one array, map, or set. |
maxStringLength | 500 | Maximum characters kept from one string. |
maxSerializedValueBytes | 16 KiB | Maximum retained size of one captured value. |
runtimeStateTargetBytes | 256 KiB | Soft size goal for the snapshot sent with an error; extra reconstruction data is dropped first. |
maxRuntimeStateBytes | 512 KiB | Hard size limit for that snapshot; values are dropped before call history. |
redactKeys | [] | Extra case-insensitive property names to redact. |
excludeSources | [] | Source globs or function-name patterns to exclude. |
const server = node({
// ...required options
executionRecorder: {
excludeSources: ['src/lib/logger/**'],
redactKeys: ['customerEmail'],
maxEventsPerExecution: 200,
},
});Sensitive data: runtime state can include arguments
and return values. Add sensitive property names to
redactKeys.