Enable Expo Crash Reporting and Error Tracking to get comprehensive crash reports and error trends with Real User Monitoring.
With this feature, you can access the following features:
Aggregated Expo crash dashboards and attributes
Symbolicated iOS and deobfuscated Android crash reports
Trend analysis with Expo error tracking
In order to symbolicate your stack traces and deobfuscate Android crashes, upload your .dSYM, Proguard mapping files and source maps to Datadog using the expo-datadog config plugin.
If you are using EAS to build your Expo application, set cli.requireCommit to true in your eas.json file to add git repository data to your mapping files.
To verify your Expo Crash Reporting and Error Tracking configuration, you need to issue an error in your application and confirm that the error appears in Datadog.
To test your implementation:
Run your application on a simulator, emulator, or a real device. If you are running on iOS, ensure that the debugger is not attached. Otherwise, Xcode captures the crash before the Datadog SDK does.
Execute some code containing an error or crash. For example:
constthrowError=()=>{thrownewError("My Error")}
For obfuscated error reports that do not result in a crash, you can verify symbolication and deobfuscation in Error Tracking.
For crashes, after the crash happens, restart your application and wait for the React Native SDK to upload the crash report in Error Tracking.
To make sure your source maps are correctly sent and linked to your application, you can also generate crashes with the [react-native-performance-limiter][14] package.
Install it with yarn or npm then re-install your pods:
yarn add react-native-performance-limiter # or npm install react-native-performance-limiter(cd ios && pod install)
Both Datadog and Sentry config plugins use regular expressions to modify the “Bundle React Native code and images” iOS build phase to send the source map. This can make your EAS builds fail with a error: Found argument 'datadog-ci' which wasn't expected, or isn't valid in this context error.
To use both plugins, make sure to add the expo-datadog plugin first in order in your app.json file:
"plugins": [
"expo-datadog",
"sentry-expo"
]
If you are using the expo-dev-client and already have the expo-datadog plugin, revert its changes to the project.pbxproj file before adding sentry-expo and running npx expo prebuild with both plugins.