Skip to content
Reccy Logo
Homepage Documentation Guides

Advanced Configuration

When using feature flags extensively, configure Reccy to test new features with older sessions.

Sessions recorded before a feature flag existed can still test that feature by:

  1. Reccy detects which feature flags affect the session’s code path
  2. During replay, Reccy can inject different flag values
  3. The same session exercises new code paths without re-recording

In your project settings, navigate to Feature Flags and:

  1. Define your feature flag source (LaunchDarkly, Split, custom)
  2. Map flag names to their possible values
  3. Reccy will automatically test sessions with different flag combinations

By default, Reccy stubs all XHR, Fetch, and WebSocket requests with recorded responses. You can customize this behavior.

To test your backend code alongside frontend changes:

  1. Go to Project Settings > Network Stubbing
  2. Select which request patterns to pass through
  3. These requests will hit your actual backend during replay

For Next.js apps using the App Router, Reccy automatically passes through React Server Component requests while stubbing other API calls. This is enabled by default for detected Next.js projects.


Enable detailed per-file coverage by providing source maps.

  1. Ensure your build generates source maps
  2. In Project Settings > Coverage, enable source map upload
  3. Configure your CI workflow to upload maps:
- uses: reccy/report-diffs-action/upload-assets@v1
with:
api-token: ${{ secrets.RECCY_API_TOKEN }}
app-directory: "dist"
source-maps: true

With source maps, you can:

  • View coverage percentages per file and folder
  • Identify untested code paths
  • Prioritize which user flows to record

Record sessions in one environment (production) and replay against another (staging/preview).

For cross-environment replay to work:

AspectMust Match
RoutesSame URL patterns
AuthCompatible token format
APIsSame endpoint paths
AssetsUse relative URLs

Assets loading from wrong environment:

<!-- Won't work cross-environment -->
<script src="https://prod.example.com/app.js"></script>
<!-- Works everywhere -->
<script src="/app.js"></script>

Auth tokens rejected:

  • Ensure test environments accept tokens from the recording environment
  • Or configure token refresh for the target environment

For monorepos with multiple apps:

Create a Reccy project per app, each with its own:

  • Recording token
  • Session pool
  • CI workflow

If apps share components, you can:

  1. Record sessions from the consumer app
  2. Configure Reccy to test both consumer and component library changes
  3. Set up path-based workflow triggers:
on:
push:
paths:
- "apps/web/**"
- "packages/ui/**"

For single-page apps or complex initialization:

import { startRecording, stopRecording } from "@reccyai/recorder";
// Start after specific conditions
await authenticateUser();
startRecording();
// Stop before sensitive operations
stopRecording();
await processPayment();
startRecording();

Record to memory first, then decide whether to send:

import { initRecorder, flush, discard } from "@reccyai/recorder";
initRecorder({
recordingToken: "<<TOKEN>>",
bufferMode: true,
});
// Later, based on conditions:
if (userOptedIn) {
await flush(); // Send buffered data
} else {
discard(); // Clear buffer without sending
}