You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page covers the advanced options of the React Native SDK. All options are set as properties on a `DdSdkReactNativeConfiguration`instance before calling `DdSdkReactNative.initialize(config)`.
7
+
This page covers the advanced options of the React Native SDK. All eight constructor arguments are read-only; arguments 7 and 8 are the less obvious `trackingConsent` and `useAccessibilityLabel` options. Set the remaining advanced options as instance properties. Complete all configuration before calling `DdSdkReactNative.initialize(config)`.
@@ -96,7 +103,41 @@ import { WebView } from '@flashcatcloud/mobile-react-native-webview';
96
103
/>
97
104
```
98
105
99
-
`allowedHosts` is the list of hosts allowed to be associated; subdomains are matched. The page loaded in the WebView must already integrate the <ahref="/en/rum/sdk/web/sdk-integration">Flashduty Browser SDK</a>. The component is fully compatible with the props of `react-native-webview`.
106
+
`allowedHosts` is the list of hosts allowed to be associated; subdomains are matched. The page loaded in the WebView must already integrate the <ahref="/en/rum/sdk/web/sdk-integration">Flashduty Browser SDK</a>.
107
+
108
+
The component passes through most `react-native-webview` props, but it controls the following props to inject the RUM bridge:
109
+
110
+
-`nativeConfig`
111
+
-`onMessage`
112
+
-`injectedJavaScript`
113
+
-`injectedJavaScriptBeforeContentLoaded`
114
+
115
+
You can still provide your own `onMessage` handler and injected scripts: the component forwards non-RUM messages to your handler and executes the scripts after wrapping them. A custom `nativeConfig` is overwritten. Set `logUserCodeErrors={true}` to record errors from injected user code as logs; it defaults to `false`. Because Logs currently works only on Android, these errors are not reported from iOS.
`proxyConfig` supports HTTP, HTTPS, and SOCKS proxies. HTTP and HTTPS proxies support Basic Authentication. SOCKS proxies do not support a username or password; the SDK logs a warning and ignores credentials when you provide them.
@@ -224,26 +265,32 @@ A dSYM is matched to crash events by the binary's **UUID**, and every release bu
224
265
</Tabs>
225
266
226
267
<Warning>
227
-
**Upload symbol files for both platforms separately.** Symbol files are matched by service, and without an explicit `serviceName` Android falls back to the `applicationId` while iOS falls back to the bundle identifier — one app becomes two services in the console, and the Android mapping file is never applied to an iOS crash or vice versa. Set `serviceName` explicitly so both platforms agree, and upload from each platform's release pipeline.
268
+
**Upload symbol files for both platforms separately.** Symbol files are matched by service, and without an explicit `serviceName` Android falls back to the `applicationId` while iOS falls back to the bundle identifier. If those platform identifiers differ, one app becomes two services in the console, and the Android mapping file is never applied to an iOS crash or vice versa. Set `serviceName` explicitly so both platforms agree, and upload from each platform's release pipeline.
228
269
</Warning>
229
270
230
271
## Other options
231
272
232
273
| Option | Default | Description |
233
274
|------|--------|------|
234
-
|`serviceName`| Platform default |**Strongly recommended.** When unset, Android uses `applicationId` and iOS the bundle identifier, splitting the app into two services |
275
+
|`serviceName`| Platform default |**Recommended.** When unset, Android uses `applicationId` and iOS the bundle identifier; the app is split into two services when those identifiers differ|
235
276
|`nativeCrashReportEnabled`| false | Whether to collect native crashes |
236
-
|`version` / `versionSuffix`| App version | Override the reported version / append a suffix; must match the version used for source map upload |
277
+
|`version` / `versionSuffix`| App version | Override the reported version / append a suffix; only letters, numbers, `_`, `-`, `:`, `.`, and `/` are preserved, other characters become `_`, and the SDK adds `-` before the suffix; the result must match the source map upload version|
237
278
|`verbosity`| undefined | SDK internal log level (`SdkVerbosity.DEBUG` / `INFO` / `WARN` / `ERROR`); use it when troubleshooting the integration |
279
+
|`nativeViewTracking`| false | Enable native view tracking for a custom navigation system based on native views |
280
+
|`nativeInteractionTracking`| false | Collect user interactions on native screens |
238
281
|`trackBackgroundEvents`| false | Whether to collect events while no view is active; enabling it increases the session count |
239
-
|`vitalsUpdateFrequency`|`VitalsUpdateFrequency.AVERAGE`|Collection frequency of native mobile vitals; set to`NEVER` to disable|
240
-
|`nativeLongTaskThresholdMs`| 200 | Native main-thread long task threshold in milliseconds; `0`or`false` disables it |
241
-
|`longTaskThresholdMs`| 0 (disabled) | JS-thread long task threshold in milliseconds; set 100 to 5000 to enable|
282
+
|`vitalsUpdateFrequency`|`VitalsUpdateFrequency.AVERAGE`|Native mobile vital frequency: `FREQUENT`, `AVERAGE`, `RARE`, or`NEVER`|
283
+
|`nativeLongTaskThresholdMs`| 200 | Native main-thread long task threshold in milliseconds; `0`/`false` disables it, and enabled values are clamped to 100–5000|
284
+
|`longTaskThresholdMs`| 0 (disabled) | JS-thread long task threshold in milliseconds; `0` / `false` disables it, and enabled values are clamped to 100–5000|
242
285
|`trackFrustrations`| true | Whether to derive frustration signals (such as error taps) from user actions |
243
286
|`actionNameAttribute`| undefined | Which component prop to use as the name of automatically collected actions (for example `testID`); `dd-action-name` takes precedence |
244
-
|`useAccessibilityLabel`| true | Whether to use `accessibilityLabel` as the action name |
287
+
|`useAccessibilityLabel`| true | Whether to use `accessibilityLabel` as the action name; read-only constructor argument 8 |
288
+
|`bundleLogsWithRum`| true | Whether to correlate Android logs with the current RUM session; Logs is a no-op on iOS |
245
289
|`trackNonFatalAnrs`| Platform default | Whether to collect non-fatal ANRs; disabled by default on Android 30+, enabled on Android 29 and below |
246
290
|`appHangThreshold`| undefined | iOS App Hang threshold in seconds; unset means disabled |
291
+
|`initialResourceThreshold`| 0.1 seconds | Time window after a view starts in which resources are included in Time to Network-Settled (TNS) |
247
292
|`trackWatchdogTerminations`| false | Whether to collect iOS watchdog terminations |
248
-
|`uploadFrequency` / `batchSize` / `batchProcessingLevel`|`AVERAGE` / `MEDIUM` / `MEDIUM`| Upload frequency, batch size, and batches per upload cycle; trade off freshness against battery |
249
-
|`proxyConfig`| undefined | Report through an HTTP / SOCKS proxy |
Copy file name to clipboardExpand all lines: en/rum/sdk/react-native/compatible.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ JavaScript class names begin with `Dd*` (`DdSdkReactNative`, `DdSdkReactNativeCo
58
58
| Logs |`DdLogs` only sends logs on Android; it is a no-op on iOS and sends nothing |
59
59
| Static resources | Only requests issued from JavaScript are collected; images, fonts, and other resources loaded by the native networking stack such as `<Image>` are **not collected**, and the console does not show static-resource panels for React Native applications |
60
60
| Resource type | Every collected request is recorded as `xhr`, regardless of the response Content-Type |
61
-
| Android app launch time |No app launch vital on Android yet; iOS reports cold / warm launch time |
61
+
| Android app launch time |The React Native Android bridge does not yet report launch events; iOS reports cold / warm launch time |
62
62
| Platform scope | iOS / Android only; React Native Web is not supported |
63
63
| Minimum version |`0.1.1` or later is recommended; in `0.1.0` the Android release build fails when `FLASHCAT_API_KEY` is missing |
Copy file name to clipboardExpand all lines: en/rum/sdk/react-native/data-collection.mdx
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Every event carries the following context (collected by the native layer):
24
24
-**Device**: device model, OS and version, screen size
25
25
-**Session**: `session.id`, sampled by `sessionSamplingRate`
26
26
-**Connectivity**: network type (when available)
27
-
-**User**: `usr.id` / `usr.name` / `usr.email` set through `DdSdkReactNative.setUser`
27
+
-**User**: `usr.id` / `usr.name` / `usr.email` set through `DdSdkReactNative.setUserInfo`
28
28
-**Global attributes**: custom fields set through `DdSdkReactNative.setAttributes`
29
29
30
30
## Network request collection boundary
@@ -48,7 +48,7 @@ The console shows a Performance page for React Native applications. Native vital
48
48
49
49
| Metric | Android | iOS | Description |
50
50
|------|---------|-----|------|
51
-
| App launch time | Not yet | Cold / warm launch | Android does not report launch time yet; the corresponding console card shows "No data" |
51
+
| App launch time | Not yet | Cold / warm launch |The React Native Android bridge does not yet report the launch event; the corresponding console card shows "No data" |
52
52
| Refresh rate | Supported | Supported | Rendering frame rate of the native UI thread |
53
53
|**JS-thread frame rate**| Supported | Supported | React Native-specific; reflects whether application JS code is janky; shown on the console's Performance page |
54
54
| CPU | Supported | Supported | CPU usage during the view |
**`serviceName`must be set explicitly.** Without it, Android defaults to the `applicationId` and iOS to the bundle identifier, so one application is split into two services in the console: the same error appears once per service in the issue list, and filters and source map matching are separated as well.
72
-
</Warning>
70
+
<Tip>
71
+
**Set `serviceName`explicitly for cross-platform consistency.** Without it, Android defaults to the `applicationId` and iOS to the bundle identifier. If those platform identifiers differ, one application is split into two services, separating issue lists, filters, and source map matching.
72
+
</Tip>
73
73
74
74
<Warning>
75
75
Do not use server-side secrets in client code. `clientToken` is only used for client-side RUM data reporting, and `applicationId` is used to attribute RUM application data.
@@ -111,16 +111,43 @@ function App() {
111
111
}
112
112
```
113
113
114
-
Only one `NavigationContainer` can be tracked at a time; call `DdRumReactNavigationTracking.stopTrackingViews()` before switching containers.
114
+
Only one `NavigationContainer` can be tracked at a time. Pass the previous container reference when you stop tracking before switching containers:
The second argument to `startTrackingViews` can rename views. Return `null` to ignore a route. To use this control, replace the call inside `onReady` above with this one:
Returning `null` only skips the new view; it does not stop the previous RUM view. Later events on the ignored screen may still be attributed to that previous view. Use manual view tracking when you need an explicit view boundary.
Call `DdRumReactNativeNavigationTracking.stopTracking()` when automatic tracking is no longer needed.
147
+
148
+
<Note>
149
+
Returning `null` only skips the new view; it does not stop the previous RUM view. Later events on the ignored screen may still be attributed to that previous view. Use manual view tracking when you need an explicit view boundary.
150
+
</Note>
124
151
</Tab>
125
152
<Tabtitle="Manual">
126
153
If you use neither library, start and stop views manually:
@@ -168,7 +195,7 @@ To correlate frontend requests with backend traces, configure `firstPartyHosts`;
168
195
After sign-in, set the current user. The SDK writes the user fields into the `usr` object of subsequent RUM events. Always pass `id`: iOS ignores calls without an `id`.
0 commit comments