Skip to content

Commit

Permalink
Merge pull request #454 from DataDog/elie.abichar/RUMM-3098-fix-docum…
Browse files Browse the repository at this point in the history
…entation-errors

Fix errors in the initialization of the sdk
  • Loading branch information
louiszawadzki authored Apr 18, 2023
2 parents 861ff90 + 33c2bdc commit 429c794
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ config.serviceName = 'com.example.reactnative';
// Optional: let the SDK print internal logs above or equal to the provided level. Default is undefined (meaning no logs)
config.verbosity = SdkVerbosity.WARN;

await DdSdkReactNative.initialize(config);
DdSdkReactNative.initialize(config);

// Once the Datadog React Native SDK for RUM is initialized, you need to setup view tracking to be able to see data in the RUM dashboard
```
Expand Down Expand Up @@ -102,7 +102,7 @@ config.sessionSamplingRate = 80;
config.resourceTracingSamplingRate = 80;
config.firstPartyHosts = ['example.com']; // matches 'example.com' and subdomains like 'api.example.com'

await DdSdkReactNative.initialize(config);
DdSdkReactNative.initialize(config);

// Once the Datadog React Native SDK for RUM is initialized, you need to setup view tracking to be able to see data in the RUM dashboard
```
Expand Down Expand Up @@ -135,7 +135,7 @@ config.sessionSamplingRate = 80;
config.resourceTracingSamplingRate = 80;
config.firstPartyHosts = ['example.com']; // matches 'example.com' and subdomains like 'api.example.com'

await DdSdkReactNative.initialize(config);
DdSdkReactNative.initialize(config);

// Once the Datadog React Native SDK for RUM is initialized, you need to setup view tracking to be able to see data in the RUM dashboard
```
Expand Down Expand Up @@ -168,7 +168,7 @@ config.sessionSamplingRate = 80;
config.resourceTracingSamplingRate = 80;
config.firstPartyHosts = ['example.com']; // matches 'example.com' and subdomains like 'api.example.com'

await DdSdkReactNative.initialize(config);
DdSdkReactNative.initialize(config);

// Once the Datadog React Native SDK for RUM is initialized, you need to setup view tracking to be able to see data in the RUM dashboard
```
Expand Down Expand Up @@ -201,7 +201,7 @@ config.sessionSamplingRate = 80;
config.resourceTracingSamplingRate = 80;
config.firstPartyHosts = ['example.com']; // matches 'example.com' and subdomains like 'api.example.com'

await DdSdkReactNative.initialize(config);
DdSdkReactNative.initialize(config);

// Once the Datadog React Native SDK for RUM is initialized, you need to setup view tracking to be able to see data in the RUM dashboard
```
Expand Down Expand Up @@ -268,8 +268,8 @@ DdRum.stopView('<view-key>', { 'custom.bar': 42 }, Date.now());

Use one of Datadog's integrations to automatically track views for the following libraries:

- If you use the [`react-native-navigation`][5] library, then add the `@datadog/mobile-react-native-navigation` package and follow the [setup instructions][6].
- If you use the [`react-navigation`][7] library, then add the `@datadog/mobile-react-navigation` package and follow the [setup instructions][8].
- If you use the [`react-native-navigation`][5] library, then add the `@datadog/mobile-react-native-navigation` package and follow the [setup instructions][6].
- If you use the [`react-navigation`][7] library, then add the `@datadog/mobile-react-navigation` package and follow the [setup instructions][8].

## Track custom attributes

Expand Down Expand Up @@ -324,13 +324,13 @@ To prevent these events from showing in the dashboard, you can disable errors an

```
const config = new DdSdkReactNativeConfiguration(
CLIENT_TOKEN,
ENVIRONMENT,
APPLICATION_ID,
true,
!__DEV__ /* trackResources will be false in DEV mode, true otherwise */,
!__DEV__ /* trackErrors will be false in DEV mode, true otherwise */,
trackingConsent
CLIENT_TOKEN,
ENVIRONMENT,
APPLICATION_ID,
true,
!__DEV__ /* trackResources will be false in DEV mode, true otherwise */,
!__DEV__ /* trackErrors will be false in DEV mode, true otherwise */,
trackingConsent
)
```

Expand Down Expand Up @@ -375,7 +375,6 @@ For more information, see [Apache License, v2.0][9]
{{< partial name="whats-next/whats-next.html" >}}

[1]: https://app.datadoghq.com/rum/application/create
[2]: https://raw.githubusercontent.com/DataDog/dd-sdk-reactnative/main/docs/image_reactnative.png
[3]: https://docs.datadoghq.com/account_management/api-app-keys/#api-keys
[4]: https://docs.datadoghq.com/account_management/api-app-keys/#client-tokens
[5]: https://github.com/wix/react-native-navigation
Expand Down

0 comments on commit 429c794

Please sign in to comment.