diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md
index dac4daf49..b71f7eef2 100644
--- a/TROUBLESHOOTING.md
+++ b/TROUBLESHOOTING.md
@@ -9,6 +9,7 @@ See the [dedicated troubleshooting guide](./docs/troubleshooting_no_data.md).
Original issue: https://github.com/DataDog/dd-sdk-reactnative/issues/41
If you have the following error message:
+
```
Undefined symbols for architecture x86_64:
"static Foundation.JSONEncoder.OutputFormatting.withoutEscapingSlashes.getter : Foundation.JSONEncoder.OutputFormatting", referenced from:
@@ -17,6 +18,7 @@ Undefined symbols for architecture x86_64:
```
open Xcode and go to `Build Settings` of your project (_not your app target_) then make sure `Library Search Paths` is the following:
+
```
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
@@ -42,7 +44,7 @@ We made the change below to fix it:
### Infinite loop-like error messages
Sometimes, almost randomly, my RN project gives error messages non-stop.
-CPU usage goes up to %+100 and you'll quickly notice a problem with your laptop fan goes crazy.
+CPU usage goes up to 100%+ and you'll quickly notice a problem when your laptop fan goes crazy.
This is the issue: https://github.com/facebook/react-native/issues/28801
diff --git a/benchmarks/README.md b/benchmarks/README.md
index e2bbf063b..b8893e34a 100644
--- a/benchmarks/README.md
+++ b/benchmarks/README.md
@@ -6,7 +6,7 @@
2. From the iOS folder, run `pod install`.
3. From the root folder, run `yarn ios` or `yarn android`.
-## Enable new architcture
+## Enable new architecture
### iOS
@@ -20,7 +20,7 @@ Set `newArchEnabled=true` in `benchmarks/android/gradle.properties`.
## ENV config
-The `.env` config file contains configuration for the Datadog API, as well as a test scenario that you can launch when the app boots up. If it doesn't contain a test scenario, the app waits for a deeplink to trigger a test scenario instead.
+The `.env` config file contains a configuration for the Datadog API, as well as a test scenario that you can launch when the app boots up. If it doesn't contain a test scenario, the app waits for a deep link to trigger a test scenario instead.
DD_CLIENT_TOKEN="CLIENT_TOKEN"
DD_API_KEY="API_KEY"
@@ -33,9 +33,11 @@ The `.env` config file contains configuration for the Datadog API, as well as a
## Changing ENV settings
### Debug
+
```
$ ENVFILE=.env.alternate yarn ios
```
+
or:
```
@@ -43,27 +45,31 @@ or:
```
### Release
+
On Android:
-```
+
+```
$ ENVFILE=.env.alternate ./gradlew assembleRelease
```
-
+
On iOS:
-```
+
+```
xcodebuild -scheme alternate
-```
+```
-## Set test scenarios using deeplinks
+## Set test scenarios using deep links
-You can trigger test scenarios by running a deeplink with a specific set of parameters to the benchmark app.
+You can trigger test scenarios by running a deep link with a specific set of parameters to the benchmark app.
## Run a test scenario
Launch a specific test scenario with a particular configuration:
+
- **Method**: `start`
- **Parameters**:
- - **scenario**: name of the test as defined on `Scenario` enum in `types/testConfig.ts`
- - **runType**: `instrumented|baseline|profiling`
+ - **scenario**: name of the test as defined on the `Scenario` enum in `types/testConfig.ts`
+ - **runType**: `instrumented|baseline|profiling`
### iOS
@@ -95,9 +101,9 @@ xcrun simctl openurl booted "benchmark://stop"
adb shell am start -W -a android.intent.action.VIEW -d 'benchmark://stop' com.benchmarkrunner
```
-## Adding a New Scenario to Benchmarks
+## Adding a new scenario to benchmarks
-### Define the New Scenario
+### Define the new scenario
In `benchmarks/src/testSetup/types/testConfig.ts`, add a new entry to the `Scenario` enum:
@@ -110,7 +116,7 @@ export enum Scenario {
}
```
-The string value (`'newScenario'`) is what must be passed using deeplink as the `scenario` parameter.
+The string value (`'newScenario'`) is what must be passed using a deep link as the `scenario` parameter.
Alternatively, if you're using a `.env` file to set the scenario, add:
@@ -118,14 +124,14 @@ Alternatively, if you're using a `.env` file to set the scenario, add:
BENCH_SCENARIO="newScenario"
```
-### Create the Scenario Component
+### Create the scenario component
Create a new folder under `benchmarks/src/scenario/` named after your scenario (for example, `NewScenario`). Inside this folder, define your scenario’s main component and its props.
Create a `types.ts` file:
```ts
-import type { TestConfig } from "benchmarks/src/testSetup/types/testConfig";
+import type {TestConfig} from 'benchmarks/src/testSetup/types/testConfig';
export type NewScenarioProps = {
testConfig?: TestConfig;
@@ -144,7 +150,7 @@ function NewScenario(props: NewScenarioProps): React.JSX.Element {
export default NewScenario;
```
-### Register the Scenario in the App
+### Register the scenario in the app
In `benchmarks/src/App.tsx`, add a new case to the scenario switch using the enum identifier you just created:
@@ -153,9 +159,9 @@ case Scenario.NewScenario:
return ;
```
-You can now trigger this scenario either through a deeplink or by setting `BENCH_SCENARIO` in the `.env` file.
+You can then trigger this scenario through either a deep link or by setting `BENCH_SCENARIO` in the `.env` file.
-## Instrumenting a Scenario
+## Instrument a scenario
Depending on the scenario’s structure and flow, the Datadog SDK initialization may vary. Each scenario is responsible for managing its own initialization logic.
@@ -178,5 +184,11 @@ useEffect(() => {
If your scenario uses the `DatadogProvider`, you can retrieve the necessary configuration using `getDatadogProviderConfig()` from the same `testUtils` module:
```ts
-return ...
+return (
+
+ ...
+
+);
```
diff --git a/packages/core/README.md b/packages/core/README.md
index 392e10f2a..16362628e 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -46,7 +46,7 @@ const datadogConfiguration = new DatadogProviderConfiguration(
true, // track XHR Resources
true // track Errors
);
-// Optional: Select your Datadog website (one of "US1", "US3", "US5", EU1", "AP1", "AP2", or "US1_FED"). Default is "US1".
+// Optional: Select your Datadog website (one of "US1", "US3", "US5", "EU1", "AP1", "AP2", or "US1_FED"). Default is "US1".
datadogConfiguration.site = 'US1';
// Optional: enable or disable native crash reports
datadogConfiguration.nativeCrashReportEnabled = true;
@@ -102,7 +102,7 @@ tempers with the linux kernel, the stored data might become readable.
### iOS
Before data is uploaded to Datadog, it is stored in cleartext in the cache directory (`Library/Caches`)
-of your [application sandbox](4), which can't be read by any other app installed on the device.
+of your [application sandbox][4], which can't be read by any other app installed on the device.
[1]: https://app.datadoghq.com/rum/application/create
[2]: https://raw.githubusercontent.com/DataDog/dd-sdk-reactnative/main/docs/image_reactnative.png