Skip to main content

Configuration

Options for Pulse.start() — the JS-layer initialization call.

note

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.

OptionDefaultDescription
autoDetectExceptionstrueGlobal JS error handler — catches unhandled exceptions and promise rejections
autoDetectNetworktrueIntercepts XMLHttpRequest / fetch / axios — zero code changes required
autoDetectNavigationtrueKill 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.

LevelValueWhat you see
VERBOSE0Internal event matching, fine-grained flow details
DEBUG1Export results, config fetch, feature toggles
INFO2Session boundaries, init completion
WARN3Recoverable errors, export failures
ERROR4Unrecoverable errors
NONE5Silent — default
warning

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:

Next Steps

I want to…Go to
Configure a specific instrumentationInstrumentation guides
Track business eventsCustom Events
Report handled errorsError Tracking
Measure operation durationsCustom Spans
Catch React render errorsError Boundaries
Attach user identityUser Identification
Add global metadataGlobal Attributes
Gate collection behind consentData Collection Consent
Configure native iOS instrumentationiOS APIs
Configure native Android instrumentationAndroid APIs