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

Configure the Overseer SDK

Configuration

Complete guide to configuring the Overseer SDK.

Basic Configuration

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

init({
  // Required
  dsn: 'https://your-project.codmir.com/overseer',
  service: 'my-app',
  environment: 'production',
  
  // Optional
  release: '1.0.0',
  enabled: true,
  debug: false,
});

All Options

Core Options

OptionTypeDefaultDescription
dsnstringRequiredOverseer endpoint URL
servicestringRequiredService/app name for grouping
environmentstringRequiredEnvironment name
releasestring-App version for release tracking
enabledbooleantrueEnable/disable the SDK
debugbooleanfalseEnable debug console logging

Sampling

OptionTypeDefaultDescription
errorSampleRatenumber1Percentage of errors to capture (0-1)
tracesSampleRatenumber1Percentage of transactions to trace (0-1)

Session Replay

OptionTypeDefaultDescription
enableReplaybooleantrueEnable session replay
replaySampleRatenumber0.1Percentage of sessions to record (0-1)
replayOnErrorSampleRatenumber1.0Percentage of error sessions to record (0-1)

Privacy

OptionTypeDefaultDescription
maskAllInputsbooleanfalseMask all form input values
maskSelectorsstring[][]CSS selectors to mask content

Performance

OptionTypeDefaultDescription
enablePerformancebooleantrueEnable performance tracking

Transport

OptionTypeDefaultDescription
maxBatchSizenumber50Max events per batch
flushIntervalnumber5000Flush interval in ms

Environment-Based Config

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

const isProduction = process.env.NODE_ENV === 'production';

init({
  dsn: process.env.NEXT_PUBLIC_OVERSEER_DSN,
  service: 'my-app',
  environment: process.env.NODE_ENV,
  
  // Less sampling in development
  errorSampleRate: isProduction ? 1 : 0.5,
  replaySampleRate: isProduction ? 0.1 : 0,
  
  // Debug in development
  debug: !isProduction,
  
  // Only enable in production
  enabled: isProduction,
});

Filtering Events

Use beforeSend to filter or modify events:

init({
  dsn: '...',
  service: 'my-app',
  environment: 'production',
  
  beforeSend(event) {
    // Skip hydration errors
    if (event.message?.includes('Hydration')) {
      return null;
    }
    
    // Skip chunk load errors
    if (event.message?.includes('ChunkLoadError')) {
      return null;
    }
    
    // Sanitize sensitive data
    if (event.extra?.password) {
      delete event.extra.password;
    }
    
    // Modify event
    event.tags = {
      ...event.tags,
      customTag: 'value',
    };
    
    return event;
  },
});

Privacy Configuration

Mask sensitive content in session replay:

init({
  dsn: '...',
  service: 'my-app',
  environment: 'production',
  
  // Mask all form inputs
  maskAllInputs: true,
  
  // Mask specific elements
  maskSelectors: [
    '.credit-card',
    '[data-sensitive]',
    '#ssn-input',
  ],
});

Next.js Configuration

// instrumentation-client.ts
import * as Overseer from '@codmir/overseer/nextjs';

Overseer.init({
  dsn: process.env.NEXT_PUBLIC_OVERSEER_DSN,
  environment: process.env.NODE_ENV,
  release: process.env.NEXT_PUBLIC_APP_VERSION,
  
  // Next.js specific
  replaysSessionSampleRate: 0.1,
  replaysOnErrorSampleRate: 1.0,
  
  beforeSend(event) {
    // Filter framework noise
    if (event.message?.includes('Text content does not match')) {
      return null;
    }
    return event;
  },
});

Disabling in Tests

// jest.setup.ts or vitest.setup.ts
import { init } from '@codmir/overseer';

init({
  dsn: 'test',
  service: 'test',
  environment: 'test',
  enabled: false, // Disable in tests
});
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