SOURCES GUIDE

Bugsnag

Step-by-step guide to send event data when your application crashes from RudderStack to Bugsnag.

Bugsnag provides error reporting libraries for every major software platform which automatically detect and report errors in your applications, and capture diagnostic data required to help you reproduce and fix each error.

Bugsnag monitors application stability so you can make data-driven decisions on whether you should be building new features, or fixing bugs.

Getting Started

To enable sending data when application crashes to Bugsnag, you will first need to add it as a destination to the source from which you are sending your event data. Once the destination is enabled, events from our SDK will start flowing to Bugsnag.

Connection Mode

Web

Mobile

Server

Device mode

Supported

Supported

-

Cloud mode

-

-

-

Once you have confirmed that the platform supports sending events to Bugsnag, perform the steps below:

Please follow our Adding a Source and Destination guide to add a source and destination in RudderStack.

  • Give a name to the destination and click on Next. You should then see the following screen:

Connection settings for Bugsnag
  • Add your API key to your connection settings. You can find your API key in your Bugsnag dashboard under “Settings”, which is located in the upper left-hand corner.

  • Click on Next to complete the configuration. Bugsnag should now be added and enabled as a destination in RudderStack.

Adding Bugsnag to your Mobile project

Android
IOS
Android

Please follow the steps below to add Bugsnag to your Android Project:

  • Add the following repository to your app/build.gradle file.

repositories {
maven { url "https://dl.bintray.com/rudderstack/rudderstack" }
}
  • After that, add the following dependencies in the same file:

implementation 'com.rudderstack.android.sdk:core:1.0.1-beta.1'
implementation 'com.rudderstack.android.integration:bugsnag:0.1.0-beta.1'
  • Finally, change the initialization of your RudderClient in your Application class

val rudderClient = RudderClient.getInstance(
this,
<YOUT_WRITE_KEY>,
RudderConfig.Builder()
.withDataPlaneUrl(<YOUR_DATA_PLANE_URL>)
.withFactory(BugsnagIntegrationFactory.FACTORY)
.build()
)
IOS

Follow these steps to add Bugsnag to your iOS project:

  • Go your Podfile and add the Rudder-Bugsnag extension

pod 'Rudder-Bugsnag', '0.1.0-beta.1'
  • After adding the dependency followed by pod install , you can add the imports to your AppDelegate.m file as shown:

#import "RudderBugsnagFactory.h"
  • Finally, change the initialization of your RudderClient as shown:

RudderConfigBuilder *builder = [[RudderConfigBuilder alloc] init];
[builder withDataPlaneUrl:<YOUR_DATA_PLANE_URL>];
[builder withFactory:[RudderBugsnagFactory instance]];
[RudderClient getInstance:<YOUR_WRITE_KEY> config:[builder build]];

Identify

The identify call lets you associate a user to their actions and capture all the relevant traits about them. This information includes a unique userid as well as any optional information such as name, email address, etc.

An example identify call from our JS source looks like this:

rudderanalytics.identify("abc123", {
name: "Foo Bar",
email: "foo@bar.com",
});

Bugsnag will show you the userId and traits in the Users tab of each error.

Error Reporting

Along with user-specific information, you can also use Bugsnag to track handled exceptions data to your dashboard using Bugsnag’s native methods. You can find the documentation for these functions on their website.

FAQ

Where do I find the API Key?

You can find your API Key on your Bugsnag Project Settings page.

What is meant by Release Stage?

You can distinguish errors that happen in different stages of your app’s release process e.g production, development, etc.

Do I need to use SSL?

You should definitely use SSL When Sending Data to Bugsnag specifically from JS source.

Contact Us

If you come across any issues while configuring AppsFlyer with RudderStack, please feel free to contact us or start a conversation on our Discord channel. We will be happy to help you.