Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const configuration = new DatadogProviderConfiguration(
| `nativeCrashReportEnabled` | `RumConfiguration` | Moved. |
| `nativeViewTracking` | `RumConfiguration` | Moved. |
| `nativeInteractionTracking` | `RumConfiguration` | Moved. |
| `firstPartyHosts` | `RumConfiguration` | Moved. |
| `firstPartyHosts` | `RumConfiguration` | Moved. Format changed from `(string \| FirstPartyHost)[]` to `FirstPartyHost[]`. |
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type change in this table row looks inaccurate for v3: the public RumConfigurationOptions.firstPartyHosts is FirstPartyHost[] (no string/union support). To avoid confusion, consider describing the change as string[] (v2) -> FirstPartyHost[] (v3), or otherwise clarify where (string | FirstPartyHost)[] is valid.

Suggested change
| `firstPartyHosts` | `RumConfiguration` | Moved. Format changed from `(string \| FirstPartyHost)[]` to `FirstPartyHost[]`. |
| `firstPartyHosts` | `RumConfiguration` | Moved. Format changed from `string[]` (v2) to `FirstPartyHost[]` (v3). |

Copilot uses AI. Check for mistakes.
| `telemetrySampleRate` | `RumConfiguration` | Moved. |
| `nativeLongTaskThresholdMs` | `RumConfiguration` | Moved. |
| `longTaskThresholdMs` | `RumConfiguration` | Moved. |
Expand All @@ -124,6 +124,46 @@ const configuration = new DatadogProviderConfiguration(
| `trackResources` | `RumConfiguration` | Moved. |
| `trackErrors` | `RumConfiguration` | Moved. |

### `firstPartyHosts` format change

In v2, `firstPartyHosts` accepted an array of strings:

```typescript
const config = {
firstPartyHosts: ['example.com', 'api.myapp.com']
};
```

In v3, `firstPartyHosts` has been moved to `rumConfiguration` and now requires an array of objects specifying the host and propagator types:

```typescript
import { PropagatorType } from '@datadog/mobile-react-native';

const config = new CoreConfiguration(
CLIENT_TOKEN,
ENVIRONMENT,
TrackingConsent.GRANTED,
Comment on lines +140 to +145
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snippet includes an import { PropagatorType } ... line but omits other required imports (CoreConfiguration, TrackingConsent, etc.), which makes it hard to copy/paste as-is. Either include the missing imports, or remove the import line and keep the snippet as pseudocode for consistency with the other examples in this guide.

Copilot uses AI. Check for mistakes.
{
rumConfiguration: {
applicationId: APPLICATION_ID,
firstPartyHosts: [
{
match: 'example.com',
propagatorTypes: [
PropagatorType.DATADOG,
PropagatorType.TRACECONTEXT
]
},
{
match: 'api.myapp.com',
propagatorTypes: [PropagatorType.DATADOG]
}
]
}
}
);
```

### FileBasedConfiguration changes

FileBasedConfiguration now requires a path to a configuration JSON file instead of trying to find a default `datadog-configuration.json` at the app's root level like it did on v2.
Expand Down
Loading