Skip to main content

Quick Start

Install and initialize the Pulse React Native SDK in your React Native project.

Install Package

Install the package using npm or yarn:

npm install @horizoneng/pulse-react-native
# or
yarn add @horizoneng/pulse-react-native

The native dependencies are automatically linked via React Native autolinking.

Initialize Android SDK

The React Native SDK requires the Pulse Android SDK to be initialized in your native Android code. This is mandatory for the SDK to function.

Initialize the SDK in your android/app/src/main/java/.../MainApplication.kt:

import android.app.Application
import com.pulse.android.sdk.PulseSDK

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

// Initialize Pulse Android SDK as early as possible
PulseSDK.INSTANCE.initialize(
application = this,
endpointBaseUrl = "https://your-backend-url.com"
)
// ... other initializations
}
}

Important: This step is mandatory. Without native SDK initialization, no telemetry will be sent. Initialize the SDK as early as possible in onCreate() to ensure app start metrics and early errors are captured accurately.

For complete Android SDK configuration options, see the Android SDK documentation.

Initialize iOS SDK

iOS support is coming soon.

Initialize React Native SDK

After native platform initialization, enable automatic instrumentation in your app entry point (e.g., App.tsx):

import { Pulse } from '@horizoneng/pulse-react-native';

// Enable auto-instrumentation features
Pulse.start();

function App() {
// Your app code
}

Auto-Instrumentation Features

What gets automatically tracked:

  • ✅ JavaScript crashes and unhandled exceptions
  • ✅ HTTP requests via fetch and XMLHttpRequest
  • ✅ React Navigation screen transitions (if configured)

Note: All autoDetect* options are enabled by default. You can disable specific features by setting them to false.

Customize Auto-Instrumentation

Best Practice: If you're not using certain features, disable them to reduce overhead:

Pulse.start({
autoDetectExceptions: true,
autoDetectNetwork: true,
autoDetectNavigation: false // Disable if not using React Navigation
});

Verification

After initialization, verify the SDK is ready:

import { Pulse } from '@horizoneng/pulse-react-native';

Pulse.start();

if (Pulse.isInitialized()) {
console.log('Pulse SDK is ready');
} else {
console.warn('Pulse SDK not initialized - check native setup');
}

Once initialised, your app will automatically start sending telemetry data to your Pulse backend. With auto-instrumentation enabled, you should immediately see:

  • Network requests (fetch/XMLHttpRequest)
  • Native platform telemetry (App Start, Activity lifecycle events, etc.)

Check your Pulse dashboard to see real-time telemetry from your application 🚀.

Next Steps

Now that you have the SDK set up, explore the Instrumentation guides to learn about:

  • Network instrumentation
  • Error instrumentation
  • Navigation instrumentation
  • Custom instrumentation