Skip to content

Commit

Permalink
add clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrieu committed May 8, 2024
1 parent 1c3308a commit 57dee17
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ further_reading:

## Overview

If you have a hybrid application built on React Native, you can use Datadog to monitor the same application both from the React Native and native sides.
React Native is a JavaScript framework for developing hybrid mobile applications that can run natively on both Android and iOS.

If you have a hybrid application that is built on React Native, you can use Datadog to monitor the same application both from the React Native and native sides.

RUM Events from both of these sources are reported as coming from the same application and the same source in Datadog RUM.

Expand All @@ -19,7 +21,7 @@ RUM Events from both of these sources are reported as coming from the same appli
- For **errors, resources, and interactions tracking**, the SDKs can work in the following ways:
- Through *auto-instrumentation* - Some React classes and methods are modified to automate this. Auto-instrumentation for JavaScript errors, resources, and interactions can only be started from JavaScript code.
- Through *manual instrumentation* - For example, if you want to report something that you consider an error, but which is not going to crash the app.
- You can share the same instance of the core SDK between native and React Native. This allows you to initialize the native SDK on either the native side or on the React Native side (by calling `DdSdkReactNative.initialize`) and have it initialized for both sides, with events appearing in the same RUM session. React Native uses the default core instance. This means that you can use *manual instrumentation* on both sides, but *auto-instrumentation* is only activated for the side that the SDK was initialized.
- You can share the same instance of the core SDK between native and React Native without having to initialize the SDK on both sides separately. This allows you to initialize the native SDK on either the native side or on the React Native side (by calling `DdSdkReactNative.initialize`) and have it initialized for both sides, with events appearing in the same RUM session. React Native uses the default core instance. This means that you can use *manual instrumentation* on both sides, but *auto-instrumentation* is only activated for the side that the SDK was initialized.
- You can report Datadog RUM events or logs only after the initialization. If you have not initialized the SDK yet, events and legs are not sent.
- You cannot change the source attribute of a RUM session - all your RUM events appear under the same source.

Expand Down

0 comments on commit 57dee17

Please sign in to comment.