Skip to content

Commit edc45dc

Browse files
Merge pull request #45 from DataDog/kari/edit_readme
[DOCS-1814] Content edit for docs site
2 parents 892e978 + b54056e commit edc45dc

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,34 @@
22

33

44
<div class="alert alert-warning">
5-
This feature is in open beta. Email <a href="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 <a href="https://docs.datadoghq.com/help/">Support</a> to ask questions or to provide feedback on this feature.
66
</div>
77

88
Datadog *Real User Monitoring (RUM)* enables you to visualize and analyze the real-time performance and user journeys of your application’s individual users.
99

1010
## Setup
1111

12-
#### NPM Installation
12+
To install with NPM, run:
1313

1414
```sh
1515
npm install dd-sdk-reactnative
1616
```
1717

18-
#### Yarn Installation
18+
To install with Yarn, run:
1919

2020
```sh
2121
yarn add dd-sdk-reactnative
2222
```
2323

2424
### Specify application details in UI
2525

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.
2829

2930
![image][2]
3031

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].
3233

3334
### Initialize the library with application context
3435

@@ -54,11 +55,11 @@ config.sampleRate = 80
5455
DdSdkReactNative.initialize(config)
5556
```
5657

57-
## Track View Navigation
58+
## Track view navigation
5859

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.
6061

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:
6263

6364
```js
6465
import * as React from 'react';
@@ -79,13 +80,13 @@ function App() {
7980
```
8081
**Note**: Only one `NavigationContainer` can be tracked at the time. If you need to track another container, stop tracking previous one first.
8182

82-
## Track Custom Attributes
83+
## Track custom attributes
8384

8485
You can attach user information to all RUM events to get more detailed information from your RUM sessions.
8586

8687
### User information
8788

88-
For user specific 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.
8990

9091
```js
9192
DdSdkReactNative.setUser({
@@ -98,7 +99,7 @@ DdSdkReactNative.setUser({
9899

99100
### Global attributes
100101

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.
102103

103104
```js
104105
DdSdkReactNative.setAttributes({
@@ -108,9 +109,9 @@ DdSdkReactNative.setAttributes({
108109
})
109110
```
110111

111-
## Manual Instrumentation
112+
## Manual instrumentation
112113

113-
If automatic instrumentation doesn't suit your needs, you can manually create RUM Events and Logs as follow:
114+
If automatic instrumentation doesn't suit your needs, you can manually create RUM Events and Logs:
114115

115116
```js
116117
import { DdSdkReactNative, DdSdkReactNativeConfiguration, DdLogs, DdRum } from 'dd-sdk-reactnative';
@@ -149,15 +150,15 @@ DdRum.startResource('<res-key>', 'GET', 'http://www.example.com/api/v1/test', ne
149150
//
150151
DdRum.stopResource('<res-key>', 200, 'xhr', new Date().getTime(), {});
151152
```
152-
153-
[1]: https://app.datadoghq.com/rum/application/create
154-
[2]: https://raw.githubusercontent.com/DataDog/dd-sdk-reactnative/main/docs/image_reactnative.png
155-
[3]: https://docs.datadoghq.com/account_management/api-app-keys/#api-keys
156-
[4]: https://docs.datadoghq.com/account_management/api-app-keys/#client-tokens
157153
## License
158154

159155
[Apache License, v2.0](LICENSE)
160156

161157
## Further Reading
162158

163159
{{< partial name="whats-next/whats-next.html" >}}
160+
161+
[1]: https://app.datadoghq.com/rum/application/create
162+
[2]: https://raw.githubusercontent.com/DataDog/dd-sdk-reactnative/main/docs/image_reactnative.png
163+
[3]: https://docs.datadoghq.com/account_management/api-app-keys/#api-keys
164+
[4]: https://docs.datadoghq.com/account_management/api-app-keys/#client-tokens

0 commit comments

Comments
 (0)