Configuration
react-nativeDeveloperv0.1.0-alpha.4
Every option accepted by ScaleBun.init(), generated from SimplifiedInitConfig.
init() accepts a single config object. This table is generated from the SimplifiedInitConfig interface in the SDK source, so it cannot drift from the code.
Minimal setup#
App.tsxTypeScript
import ScaleBun from '@scalebun/react-native';
await ScaleBun.init({
projectId: '<YOUR_PROJECT_ID>',
publishableKey: '<YOUR_PUBLISHABLE_KEY>',
apiBaseUrl: '<YOUR_API_BASE_URL>',
});All options#
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | Project ID from dashboard |
publishableKey | string | Yes | — | Publishable API key from dashboard |
apiBaseUrl | string | Yes | — | Backend API base URL |
desktopDebug | DebugConnectionConfig | No | — | Desktop debug connection. |
debug | DebugConnectionConfig | No | — | — |
sessionReplay | boolean | No | true | Enable session replay capture. |
privacy | PrivacyConfig | No | — | SDK-wide privacy settings |
features | ScaleBunFeatures | No | — | Feature opt-out flags (all enabled by default) |
verbose | boolean | No | false | Enable verbose SDK logging. |
flushIntervalMs | number | No | 5000 | Event flush interval in ms. |
maxQueueSize | number | No | 1000 | Max events per flush batch. |
performance | PerformanceFlags | No | — | Performance pipeline activation flags (tiered, default-safe). |
appId | string | No | — | Dashboard App ID. Required to enable the envelope event-tracking lane. |
clientKey | string | No | — | SDK client key (SaaS mode). Also used to authenticate the envelope lane. |
platform | 'ios' | 'android' | 'web' | 'react_native' | No | react_native | Platform override: ios | android | web | react_native. |
eventTracking | boolean | No | true when appId is present | Enable the Phase 1 envelope tracking lane (first_open/app_open/session_start/ track/identify/trackPurchase → /v1/batch). |
automaticEventTracking | boolean | No | — | Upload zero-instrumentation screen, deep-link, interaction, push, and Engage events. Direct ScaleBun.init() integrations must opt in; the application- level ScaleBunProvider enables it by default. |
autoLifecycleEvents | boolean | No | true | Auto-emit first_open/app_open/session_start on init. |
Feature opt-out#
Every capability is enabled by default. Pass features to switch one off.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
replay | boolean | No | true | Enable session replay capture. |
network | boolean | No | true | Enable network request monitoring. |
crashes | boolean | No | true | Enable crash reporting. |
session | boolean | No | true | Enable unified session tracking. |
journey | boolean | No | true | Enable user journey tracking. |
performance | boolean | No | true | Enable native performance monitoring. |
Privacy#
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
redactAuth | boolean | No | true | Redact Authorization headers in network capture. |
redactCookies | boolean | No | true | Redact Cookie headers in network capture. |
redactBodies | boolean | No | false | Redact request/response bodies in network capture. |
maskTextInputs | boolean | No | false | Mask text input values in session replay. |
maskImages | boolean | No | false | Mask image content in session replay. |