LogRocket Adapter
Send captured errors to LogRocket, which pairs them with session replay.
Install
yarn add logrocket
Activate
import { initialize, useAdapter } from 'unified-error-handling';
initialize();
await useAdapter('logrocket', {
appId: 'your-org/your-app',
});
Config
| Field | Purpose |
|---|---|
appId | Your LogRocket app id, in the org/app form (required). |
The adapter dynamically imports logrocket, initializes it with your appId, and forwards each captured error so it is attached to the recorded session.
Notes
- If
logrocketis not installed, activation throwsFailed to load LogRocket SDK…with the original import error preserved ascause. - Pair LogRocket with
setUser()so replays are identified — the store forwards user context to adapters that support it.