Preparing your workspace...

assistant-chat.tsx2.5k
utils.ts850
button.tsx720
Quick Actions
codmir
Docs
Discord
Get started
API
  • Introduction
  • Installation
  • Your First Project
  • Your First Agent
  • Overview
  • OverseerClient
  • Error Tracking
  • Session Replay
  • Incidents
  • Deployments
  • Orchestrator

Record and replay user sessions to debug errors

Session Replay

Session Replay records user interactions so you can see exactly what happened before an error occurred.

How It Works

  1. Recording - Overseer captures DOM mutations, mouse movements, clicks, and scrolls
  2. Privacy - Sensitive data is masked before recording
  3. Compression - Recordings are compressed and sent in batches
  4. Playback - Replay sessions in the Codmir dashboard

Configuration

import { init } from '@codmir/overseer';

init({
  dsn: 'https://your-project.codmir.com/overseer',
  service: 'my-app',
  environment: 'production',
  
  // Enable replay
  enableReplay: true,
  
  // Record 10% of all sessions
  replaySampleRate: 0.1,
  
  // Record 100% of sessions with errors
  replayOnErrorSampleRate: 1.0,
});

Sampling Strategies

Development

init({
  replaySampleRate: 0,        // Don't record all sessions
  replayOnErrorSampleRate: 1, // Only record errors
});

Production

init({
  replaySampleRate: 0.1,      // 10% of sessions
  replayOnErrorSampleRate: 1, // All error sessions
});

High-Value Pages

// Start recording on checkout page
import { startReplay } from '@codmir/overseer';

function CheckoutPage() {
  useEffect(() => {
    startReplay();
  }, []);
  
  return <CheckoutForm />;
}

Privacy Controls

Mask All Inputs

init({
  maskAllInputs: true,
});

Replaces input values with *** in recordings.

Mask Specific Elements

init({
  maskSelectors: [
    '.credit-card',
    '[data-sensitive]',
    '#password',
    '.private-data',
  ],
});

Block Elements

Completely hide elements from recording:

<!-- Add data-overseer-block to hide -->
<div data-overseer-block>
  This content won't be recorded
</div>

Ignore Elements

Don't record interactions with specific elements:

<!-- Add data-overseer-ignore to skip -->
<input data-overseer-ignore type="text" />

Manual Control

Start Recording

import { startReplay } from '@codmir/overseer';

// Start recording manually
const sessionId = startReplay();
console.log('Recording session:', sessionId);

Stop Recording

import { stopReplay } from '@codmir/overseer';

// Stop recording
stopReplay();

Check Status

import { isReplayActive, getReplaySessionId } from '@codmir/overseer';

if (isReplayActive()) {
  console.log('Session ID:', getReplaySessionId());
}

What's Recorded

RecordedNot Recorded
DOM changesInput values (if masked)
Mouse movementsNetwork payloads
ClicksLocalStorage data
ScrollsConsole logs
Page navigationAPI responses
CSS changes

Linking Errors to Replays

Errors captured during a replay session are automatically linked:

captureException(error);
// Error event includes replayId for linking

In the Codmir dashboard, click "View Replay" on any error to see what the user was doing.

Performance Impact

Session Replay is designed to be lightweight:

  • CPU: < 1% overhead
  • Memory: ~5MB buffer
  • Network: Compressed batches, ~50KB/minute average
  • Bundle: ~5KB gzipped (tree-shakeable)

Best Practices

  1. Start with error-only recording - Set replaySampleRate: 0 initially
  2. Use privacy controls - Mask sensitive data
  3. Sample in production - 1-10% is typical
  4. Review regularly - Watch replays to understand user behavior
Open in ChatGPTOpen in ClaudeConnect MCP on CursorConnect MCP on WindsurfEdit on GitHub
codmir
Products
Desktop AppMobile AppIDE ExtensionAI AgentsOverseerVoice ModeCortex ProtocolHive MindGame Dev (Godat)PricingDownload
Solutions
AI Code AgentsCode ReviewError TrackingSelf-HealingDeploy TrackingAI Tracking SDKWorkflow AutomationTesting FrameworkTime TrackingVoice Control
Platform
ProjectsTickets & BoardsAgent MarketplaceIntegrationsTemplatesApp HubAdmin PanelAnalytics
Integrations
GitHubSlackDiscordVercelSentryRailwayLinearAll Integrations
Developers
DocumentationAPI ReferenceSDKCLIDeveloper PortalMarketplaceMCP ConnectorsWebhooksExamplesnpm Packages
Resources
BlogChangelogCommunityTutorialsGet StartedSupportStatusFeedback
Company
AboutCareersContact SalesKickstarterReferral Program
Legal
Terms of UsePrivacy PolicyEULATrademarkSecurity
Download on the App StoreGet it on Google Play

Codmir™ 2026. All rights reserved.

Free & open source SDK — Apache 2.0 License