ScaleBun
Skip to article

Configuration

react-nativeDeveloper

Every option accepted by ScaleBun.init(), generated from SimplifiedInitConfig.

Updated

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({
  clientKey: '<YOUR_CLIENT_KEY>',
  appId: '<YOUR_APP_ID>',

});

All options#

Exactly one of these two is required: clientKey alone (SaaS mode), or both modes — it defaults to ScaleBun's cloud API.

OptionTypeRequiredDefaultDescription
projectIdstringConditional — with publishableKey, unless clientKey is set—Project ID from dashboard
publishableKeystringConditional — with projectId, unless clientKey is set—Publishable API key from dashboard
desktopDebugDebugConnectionConfigNo—Desktop debug connection.
debugDebugConnectionConfigNo——
sessionReplaybooleanNotrueEnable session replay capture.
privacyPrivacyConfigNo—SDK-wide privacy settings
featuresScaleBunFeaturesNo—Feature opt-out flags — see "Feature opt-out" below for which are entitlement- or native-setup-gated
verbosebooleanNofalseEnable verbose SDK logging.
flushIntervalMsnumberNo5000Event flush interval in ms.
maxQueueSizenumberNo1000Max events per flush batch.
performancePerformanceFlagsNo—Performance pipeline activation flags (tiered, default-safe).
appIdstringNo—Dashboard App ID. Required to enable the envelope event-tracking lane.
clientKeystringConditional — required unless projectId+publishableKey are set—SDK client key (SaaS mode). Also used to authenticate the envelope lane.
platform'ios' | 'android' | 'web' | 'react_native'Noreact_nativePlatform override: ios | android | web | react_native.
eventTrackingbooleanNotrue when appId is presentEnable the Phase 1 envelope tracking lane (first_open/app_open/session_start/ track/identify/trackPurchase → /v1/batch).
automaticEventTrackingbooleanNo—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.
autoLifecycleEventsbooleanNotrueAuto-emit first_open/app_open/session_start on init.

Feature opt-out#

Core monitoring and analytics capabilities (session replay, network monitoring, crash reporting, performance) are enabled after initialization and can be switched off via features. OTA and select advanced capabilities require explicit setup, native configuration, or plan entitlement — they are not part of this opt-out set.

OptionTypeRequiredDefaultDescription
replaybooleanNotrueEnable session replay capture.
networkbooleanNotrueEnable network request monitoring.
crashesbooleanNotrueEnable crash reporting.
sessionbooleanNotrueEnable unified session tracking.
journeybooleanNotrueEnable user journey tracking.
performancebooleanNotrueEnable native performance monitoring.

Privacy#

OptionTypeRequiredDefaultDescription
redactAuthbooleanNotrueRedact Authorization headers in network capture.
redactCookiesbooleanNotrueRedact Cookie headers in network capture.
redactBodiesbooleanNofalseRedact request/response bodies in network capture.
maskTextInputsbooleanNofalseMask text input values in session replay.
maskImagesbooleanNofalseMask image content in session replay.