Configuration
Options for Pulse.start() — the JS-layer initialization call.
For native-side configuration, start with iOS APIs and Android APIs.
Pulse.start(options?)
Pulse.start({
autoDetectExceptions: true, // JS crash and error detection
autoDetectNetwork: true, // HTTP request interception
autoDetectNavigation: true, // kill switch for navigation tracking
});
All options default to true. Pass false to disable an instrumentation.
| Option | Default | Description |
|---|---|---|
autoDetectExceptions | true | Global JS error handler — catches unhandled exceptions and promise rejections |
autoDetectNetwork | true | Intercepts XMLHttpRequest / fetch / axios — zero code changes required |
autoDetectNavigation | true | Kill switch — set to false to completely disable navigation tracking. Tracking requires the useNavigationTracking hook regardless — see Navigation Instrumentation. |
Network Header Capture
Capture specific request or response headers alongside network spans:
Pulse.start({
networkHeaders: {
requestHeaders: ['x-request-id', 'x-trace-id'],
responseHeaders: ['x-response-time', 'cache-control'],
},
});
Shutdown
Permanently shuts down the SDK. Cannot be reversed in the same process.
Pulse.shutdown();
Advanced
logLevel
For debugging and troubleshooting only. The SDK is silent by default (PulseLogLevel.NONE) and should stay that way in production.
import { Pulse, PulseLogLevel } from '@dreamhorizonorg/pulse-react-native';
Pulse.start({
logLevel: PulseLogLevel.DEBUG, // dev only — remove before release
});
All log lines prefixed with PulseSDK.
| Level | Value | What you see |
|---|---|---|
VERBOSE | 0 | Internal event matching, fine-grained flow details |
DEBUG | 1 | Export results, config fetch, feature toggles |
INFO | 2 | Session boundaries, init completion |
WARN | 3 | Recoverable errors, export failures |
ERROR | 4 | Unrecoverable errors |
NONE | 5 | Silent — default |
Never ship with logLevel set to anything other than PulseLogLevel.NONE. Gate it behind __DEV__ if you want it on automatically in debug builds:
Pulse.start({
logLevel: __DEV__ ? PulseLogLevel.DEBUG : PulseLogLevel.NONE,
});
This controls only the JS layer. To also enable native logs, set logLevel in the native initialization:
- Android:
logLevel = PulseLogLevel.DEBUG— see Android Advanced Configuration - iOS:
logLevel: .debug— see iOS SDK Initialization - Expo:
"logLevel": "DEBUG"/"logLevel": "debug"underandroid/iosinapp.json— see Expo Plugin Reference
Next Steps
| I want to… | Go to |
|---|---|
| Configure a specific instrumentation | Instrumentation guides |
| Track business events | Custom Events |
| Report handled errors | Error Tracking |
| Measure operation durations | Custom Spans |
| Catch React render errors | Error Boundaries |
| Attach user identity | User Identification |
| Add global metadata | Global Attributes |
| Gate collection behind consent | Data Collection Consent |
| Configure native iOS instrumentation | iOS APIs |
| Configure native Android instrumentation | Android APIs |