Skip to main content

Configuration Options

All available SDK configuration options.

Common Options

These options are available across all SDKs:

Syntropy.init({
// Required
projectId: string; // Your project ID
dsn?: string; // Optional custom ingest endpoint

// Release tracking
release?: string; // App version (e.g., "1.2.3")
dist?: string; // Build number (e.g., "45")
environment?: string; // "production", "staging", "development"

// Expo/React Native OTA
updateId?: string; // OTA update ID
updateChannel?: string; // OTA channel

// Behavior
enabled?: boolean; // Enable/disable SDK (default: true)
autoCapture?: boolean; // Auto-capture errors (default: true)
debug?: boolean; // Log SDK activity (default: false)

// Performance
sampleRate?: number; // 0.0 - 1.0 (default: 1.0)

// Filtering
beforeSend?: (event: BaseEvent) => BaseEvent | null;
});

Browser SDK Options

import { Syntropy } from '@eclosion-tech/syntropy-browser';

Syntropy.init({
projectId: 'your-project-id',

// Breadcrumbs
breadcrumbs: true, // Enable breadcrumb collection (default: true)
maxBreadcrumbs: 50, // Max breadcrumbs to store (default: 50)

// Batching
flushInterval: 5000, // Flush interval in ms (default: 5000)
maxBatchSize: 10, // Max events per batch (default: 10)
});

Node.js SDK Options

import { Syntropy } from '@eclosion-tech/syntropy-node';

Syntropy.init({
projectId: 'your-project-id',

// Batching
flushInterval: 5000, // Flush interval in ms (default: 5000)
maxBatchSize: 50, // Max events per batch (default: 50)
});

React Native SDK Options

import { Syntropy } from '@eclosion-tech/syntropy-react-native';

Syntropy.init({
projectId: 'your-project-id',

// Breadcrumbs
breadcrumbs: true, // Enable breadcrumb collection (default: true)
maxBreadcrumbs: 50, // Max breadcrumbs to store (default: 50)

// Batching
flushInterval: 5000, // Flush interval in ms (default: 5000)
maxBatchSize: 20, // Max events per batch (default: 20)
});

Option Details

projectId (required)

Your project ID from the Syntropy dashboard.

projectId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

dsn

Optional ingestion endpoint override.

dsn: 'https://syntropy.chat/api/ingest'
dsn: '/api/ingest' // self-hosted reverse proxy

release

Semantic version of your application. Used to track which version introduced bugs.

release: '1.2.3'
release: process.env.npm_package_version
release: Application.nativeApplicationVersion

environment

Environment name for filtering in the dashboard.

environment: 'production'
environment: process.env.NODE_ENV
environment: __DEV__ ? 'development' : 'production'

enabled

Disable the SDK entirely. Useful for local development.

enabled: process.env.NODE_ENV === 'production'
enabled: !__DEV__

autoCapture

Automatically capture unhandled errors.

autoCapture: true   // Capture window.onerror, unhandledrejection
autoCapture: false // Only capture manually via captureError()

sampleRate

Sample a percentage of events. Useful for high-traffic sites.

sampleRate: 1.0   // 100% of events (default)
sampleRate: 0.5 // 50% of events
sampleRate: 0.1 // 10% of events

beforeSend

Modify or filter events before sending.

beforeSend: (event) => {
// Drop specific errors
if (event.payload.message?.includes('ResizeObserver')) {
return null;
}

// Modify events
event.payload.extra = {
...event.payload.extra,
customField: 'value',
};

return event;
}

debug

Log SDK activity to console for debugging.

debug: true                    // Always log
debug: process.env.NODE_ENV === 'development'
debug: __DEV__