BugSnag is now Insight Hub – we're making some changes to how the product looks, but this won't impact the way you use BugSnag or any of your integrations.

Native integration setup

The BugSnag Performance SDK for React Native can either process and deliver spans on its own or it can be “attached” to the native Android and iOS SDKs for enhanced functionality if you are interested in how the native part of your app behaves.

With the native integration configured, you can:

  • Add system metrics captured by the native SDK to JavaScript-based spans;
  • See native app starts and other native-based spans, including adding custom spans in your native code.

Installation

With the BugSnag React Native Performance SDK already installed, follow the native integration guides to add performance monitoring to your Android and iOS projects:

SDK Minimum version Docs
bugsnag-android-performance v1.11.0 Integration guide »
bugsnag-cocoa-performance v1.11.1 Integration guide »

Basic configuration

To use the native integration, the BugSnag React Native Performance SDK is “attached” to the native SDK, reading its configuration from the native layer.

In index.js, import and attach the BugSnag performance client as follows, replacing the existing call to start (if present):

import BugsnagPerformance from '@bugsnag/react-native-performance'

BugsnagPerformance.attach()

Configuration options that are common to the React Native and native SDKs should be set in native code and will be picked up by the React Native SDK when you call attach. Any configuration that only applies to @bugsnag/react-native-performance can be passed to the attach method:

BugsnagPerformance.attach({
  codeBundleId: '12345',
})

Use the Configuration options page to see which options are available to the attach method.