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().

FieldDefaultWhat it does
enabledtrueTurns runtime-state capture on or off.
maxEventsPerExecution500Maximum events kept for one execution.
maxCapturedCallsPerFunction3Detailed successful calls kept before similar calls are summarized.
maxActiveMemoryBytes64 MiBMaximum recorder memory shared across active executions.
maxDepth3Maximum captured value depth.
maxObjectKeys30Maximum properties kept from one object.
maxArrayElements20Maximum items kept from one array, map, or set.
maxStringLength500Maximum characters kept from one string.
maxSerializedValueBytes16 KiBMaximum retained size of one captured value.
runtimeStateTargetBytes256 KiBSoft size goal for the snapshot sent with an error; extra reconstruction data is dropped first.
maxRuntimeStateBytes512 KiBHard 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.