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
Copy file name to clipboardExpand all lines: README.md
+35-39Lines changed: 35 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,5 @@
1
1
# React-Native Monitoring
2
2
3
-
4
-
<divclass="alert alert-warning">
5
-
This feature is in open beta. Contact <ahref="https://docs.datadoghq.com/help/">Support</a> to ask questions or to provide feedback on this feature.
6
-
</div>
7
-
8
3
Datadog *Real User Monitoring (RUM)* enables you to visualize and analyze the real-time performance and user journeys of your application’s individual users.
9
4
10
5
## Setup
@@ -65,46 +60,24 @@ If user interactions tracking is enabled as in the code example above, the SDK t
65
60
66
61
Alternatively, you can use the `accessibilityLabel` element property to give the tap action a name; otherwise, the element type is reported. You can check the sample app for usage examples.
67
62
68
-
## Track view navigation
69
-
70
-
**Note**: Automatic View tracking relies on the [React Navigation](https://reactnavigation.org/) package (minimum supported version is `react-navigation/[email protected]`). If you use another package to handle navigation in your application, use the manual instrumentation method described below.
63
+
### Track view navigation
71
64
72
-
### Setup
65
+
Because React Native offers a wide range of libraries to create screen navigation, by default only manual view tracking is supported. You can manually start and stop a view using the following `startView()` and `stopView` methods.
**Note**: Only one `NavigationContainer` can be tracked at the time. If you need to track another container, stop tracking previous one first.
79
+
- If you use the [`react-native-navigation`][5] library, then add the `@datadog/mobile-react-native-navigation` package and follow the [setup instructions][6].
80
+
- If you use the [`react-navigation`][7] library, then add the `@datadog/mobile-react-navigation` package and follow the [setup instructions][8].
108
81
109
82
## Track custom attributes
110
83
@@ -195,9 +168,27 @@ Resource tracking is able to provide the following timings:
195
168
*`First Byte` - The time between the scheduled request and the first byte of the response. This includes time for the request preparation on the native level, network latency, and the time it took the server to prepare the response.
196
169
*`Download` - The time it took to receive a response.
197
170
171
+
## Development mode
172
+
173
+
While in development mode, your application can submit extra events related to the React Native tooling, like code transformation errors, requests to a local development server, etc.
174
+
175
+
To prevent these events from showing in the dashboard, you can disable errors and resources tracking in dev mode, using the `__DEV__` flag:
176
+
177
+
```
178
+
const config = new DdSdkReactNativeConfiguration(
179
+
CLIENT_TOKEN,
180
+
ENVIRONMENT,
181
+
APPLICATION_ID,
182
+
true,
183
+
!__DEV__ /* trackResources will be false in DEV mode, true otherwise */,
184
+
!__DEV__ /* trackErrors will be false in DEV mode, true otherwise */,
185
+
trackingConsent
186
+
)
187
+
```
188
+
198
189
## License
199
190
200
-
[Apache License, v2.0](LICENSE)
191
+
[Apache License, v2.0][9]
201
192
202
193
## Further Reading
203
194
@@ -207,3 +198,8 @@ Resource tracking is able to provide the following timings:
You can attach user information to all RUM events to get more detailed information from your RUM sessions.
75
-
76
-
### User information
77
-
78
-
For user-specific information, use the following code wherever you want in your app (after the SDK has been initialized). The `id`, `name`, and `email` attributes are built into Datadog, and you can add other attributes that makes sense for your app.
You can also keep global attributes to track information about a specific session, such as A/B testing configuration, ad campaign origin, or cart status.
Resource tracking is able to provide the following timings:
173
-
174
-
*`First Byte` - The time between the scheduled request and the first byte of the response. This includes time for the request preparation on the native level, network latency, and the time it took the server to prepare the response.
175
-
*`Download` - The time it took to receive a response.
0 commit comments