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
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,34 @@
2
2
3
3
4
4
<divclass="alert alert-warning">
5
-
This feature is in open beta. Email <ahref="mailto:support@datadoghq.com">[email protected]</a> to ask questions or to provide feedback on this feature.
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
6
</div>
7
7
8
8
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
9
10
10
## Setup
11
11
12
-
#### NPM Installation
12
+
To install with NPM, run:
13
13
14
14
```sh
15
15
npm install dd-sdk-reactnative
16
16
```
17
17
18
-
#### Yarn Installation
18
+
To install with Yarn, run:
19
19
20
20
```sh
21
21
yarn add dd-sdk-reactnative
22
22
```
23
23
24
24
### Specify application details in UI
25
25
26
-
1. Select UX Monitoring -> RUM Applications -> New Application
27
-
2. Choose `react-native` as your Application Type in [Datadog UI][1] and provide a new application name to generate a unique Datadog application ID and client token.
26
+
1. In the [Datadog app][1], select **UX Monitoring > RUM Applications > New Application**.
27
+
2. Choose `react-native` as your Application Type.
28
+
3. Provide a new application name to generate a unique Datadog application ID and client token.
28
29
29
30
![image][2]
30
31
31
-
To ensure the safety of your data, you must use a client token. You cannot use only [Datadog API keys][3] to configure the `dd-sdk-reactnative` library, as they would be exposed client-side. For more information about setting up a client token, see the [Client Token documentation][4].
32
+
To ensure the safety of your data, you must use a client token. You cannot use only [Datadog API keys][3] to configure the `dd-sdk-reactnative` library, because they would be exposed client-side. For more information about setting up a client token, see the [Client Token documentation][4].
32
33
33
34
### Initialize the library with application context
34
35
@@ -54,11 +55,11 @@ config.sampleRate = 80
54
55
DdSdkReactNative.initialize(config)
55
56
```
56
57
57
-
## Track View Navigation
58
+
## Track view navigation
58
59
59
-
**Note**: Automatic View tracking is relying on the [React Navigation](https://reactnavigation.org/) package. If you're using another package to handle navigation in your application, use the manual instrumentation described below.
60
+
**Note**: Automatic View tracking relies on the [React Navigation](https://reactnavigation.org/) package. If you use another package to handle navigation in your application, use the manual instrumentation method described below.
60
61
61
-
To track changes in navigation as RUM Views, you need to set the `onready` callback of your `NavigationContainer` component, as follow:
62
+
To track changes in navigation as RUM Views, set the `onready` callback of your `NavigationContainer` component:
62
63
63
64
```js
64
65
import*asReactfrom'react';
@@ -79,13 +80,13 @@ function App() {
79
80
```
80
81
**Note**: Only one `NavigationContainer` can be tracked at the time. If you need to track another container, stop tracking previous one first.
81
82
82
-
## Track Custom Attributes
83
+
## Track custom attributes
83
84
84
85
You can attach user information to all RUM events to get more detailed information from your RUM sessions.
85
86
86
87
### User information
87
88
88
-
For userspecific information, you can use the following code wherever you want in your code (after the SDK has been initialized). The `id`, `name` and `email` attributes are built into the Datadog UI, but you can add any attribute that makes sense to your app.
89
+
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.
89
90
90
91
```js
91
92
DdSdkReactNative.setUser({
@@ -98,7 +99,7 @@ DdSdkReactNative.setUser({
98
99
99
100
### Global attributes
100
101
101
-
You can also keep global attributes to track information about a specific session, such as A/B testing configuration, advert campaign origin, or cart status.
102
+
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.
0 commit comments