Skip to main content

Plugin Reference

Full app.json options for the @dreamhorizonorg/pulse-react-native Expo config plugin.

Top Level

OptionRequiredDescription
endpointBaseUrlYesOTLP / Pulse backend URL
apiKeyYesProject API key
dataCollectionStateNo"ALLOWED" (default), "PENDING", or "DENIED"
endpointHeadersNoExtra HTTP headers sent with every request
configEndpointUrlNoRemote SDK config URL
customEventCollectorUrlNoCustom events / logs URL
androidNoAndroid-specific overrides
iosNoiOS-specific overrides

Top-level endpointBaseUrl and apiKey apply to both platforms. Use android / ios sections to override per platform.

android

Init overrides

OptionDescription
endpointBaseUrlOverride base URL for Android only
apiKeyOverride API key for Android only
globalAttributesKey/value pairs attached to all Android telemetry

android.instrumentation

KeyShapeDescription
crash{ "enabled": boolean }Crash reporting
network{ "enabled": boolean }Network monitoring
activity{ "enabled": boolean }Activity lifecycle
fragment{ "enabled": boolean }Fragment lifecycle
anr{ "enabled": boolean }ANR detection
slowRendering{ "enabled": boolean }Slow frame detection
interaction{ "enabled": boolean, "url"?: string }Interactions + optional config URL
note

Click tracking (view-click / compose-click) is not configurable via app.json. After prebuild, add the dependencies manually to android/app/build.gradle. See Android Click Tracking.

ios

Init overrides

OptionDescription
endpointBaseUrlOverride base URL for iOS only
apiKeyOverride API key for iOS only
globalAttributesKey/value pairs attached to all iOS telemetry

ios.configuration

KeyTypeDescription
includeScreenAttributesbooleanAttach screen metadata to telemetry
includeNetworkAttributesbooleanAttach network metadata
includeGlobalAttributesbooleanAttach global attributes

ios.instrumentation

Simple toggles — { "enabled": boolean } each: crash, appLifecycle, screenLifecycle, appStartup, location

urlSession

FieldTypeDescription
enabledbooleanInstrument URLSession
excludeOtlpEndpointsbooleanSkip your OTLP host from capture

sessions

FieldTypeDescription
enabledbooleanSession tracking
maxLifetimeSecondsnumberMax session length
backgroundInactivityTimeoutSecondsnumberBackground timeout before new session
shouldPersistbooleanPersist session across launches

interaction

FieldTypeDescription
enabledbooleanInteraction tracking
configUrlstringRemote config URL

uiKitTap

FieldTypeDescription
enabledbooleanUIKit tap events
captureContextbooleanCapture label from view hierarchy
rageobjectRage tap config (timeWindowMs, rageThreshold, radiusPt)

sessionReplay

FieldTypeDescription
enabledbooleanSession replay
replayEndpointBaseUrlstringUpload base URL
textAndInputPrivacystring"maskAll", "maskAllInputs", "maskSensitiveInputs"
imagePrivacystring"maskAll", "maskNone"
maskViewClassesstring[]Classes always masked
unmaskViewClassesstring[]Classes never masked
captureIntervalMsnumberScreenshot capture interval
compressionQualitynumber0–1
screenshotScalenumberScale factor
flushIntervalSecondsnumberFlush interval
flushAtnumberBatch size hint
maxBatchSizenumberMax batch size

What's not configurable via app.json

Some things require native code and can't be expressed in app.json:

  • Before-send hooks (span/log/metric filtering)
  • Custom OTel resource attributes
  • Custom tracer/logger providers
  • Per-request iOS URL filtering

For these, fall back to manual native initialization — see iOS SDK Initialization and Android SDK Configuration.

Full Example

{
"expo": {
"plugins": [
[
"@dreamhorizonorg/pulse-react-native",
{
"endpointBaseUrl": "https://your-backend.com",
"apiKey": "your-api-key",
"dataCollectionState": "PENDING",
"android": {
"globalAttributes": { "platform": "android" },
"instrumentation": {
"crash": { "enabled": true },
"network": { "enabled": true },
"interaction": { "enabled": true, "url": "https://your-backend.com/v1/interactions" }
}
},
"ios": {
"globalAttributes": { "platform": "ios" },
"configuration": {
"includeScreenAttributes": true
},
"instrumentation": {
"crash": { "enabled": true },
"screenLifecycle": { "enabled": false },
"uiKitTap": { "enabled": true, "captureContext": true }
}
}
}
]
]
}
}