ScaleBun
Skip to article

Configuration

react-nativeDeveloperv0.1.0-alpha.4

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

Updated Reviewed

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#

OptionTypeRequiredDefaultDescription
projectIdstringYesProject ID from dashboard
publishableKeystringYesPublishable API key from dashboard
apiBaseUrlstringYesBackend API base URL
desktopDebugDebugConnectionConfigNoDesktop debug connection.
debugDebugConnectionConfigNo
sessionReplaybooleanNotrueEnable session replay capture.
privacyPrivacyConfigNoSDK-wide privacy settings
featuresScaleBunFeaturesNoFeature opt-out flags (all enabled by default)
verbosebooleanNofalseEnable verbose SDK logging.
flushIntervalMsnumberNo5000Event flush interval in ms.
maxQueueSizenumberNo1000Max events per flush batch.
performancePerformanceFlagsNoPerformance pipeline activation flags (tiered, default-safe).
appIdstringNoDashboard App ID. Required to enable the envelope event-tracking lane.
clientKeystringNoSDK 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).
automaticEventTrackingbooleanNoUpload 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#

Every capability is enabled by default. Pass features to switch one off.

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.
Configuration · Get started · React Native SDK · ScaleBun