Skip to content

Commit a9f2e24

Browse files
docs: improve symbolication and dSYM upload accuracy across platforms (#738)
* Improve symbolication and dSYM upload docs accuracy across platforms - iOS: Add retroactive symbolication note, prerequisites section (dwarf-with-dsym), debug mode docs (EMBRACE_DEBUG_DSYM=1), improved troubleshooting - iOS CI: Fix CLI flag syntax from -app/-token to --app/--token - Android: Add mapping upload configuration info to crash reporting page - Android: Document embrace.disableMappingFileUpload Gradle property - Flutter: Add SPM instructions and DEBUG_INFORMATION_FORMAT requirement for dSYM upload - React Native 5x: Fix source map path to use embrace-assets directory - Product: Add retroactive symbolication note to dSYM symbols settings page Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update crash-reporting.md * Revert RN 5x source map path change — 5.x SDK used the old path The embrace-assets subdirectory was introduced in 6.x. The 5.x SDK (verified at tag v5.2.0 in scripts/util/ios.ts) used $CONFIGURATION_BUILD_DIR/main.jsbundle.map without the subdirectory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ccc75dc commit a9f2e24

File tree

7 files changed

+66
-7
lines changed

7 files changed

+66
-7
lines changed

docs/android/configuration/embrace-gradle-plugin.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ Whether the Embrace Gradle Plugin should report telemetry on its own performance
128128

129129
Whether the Embrace Gradle Plugin should fail the build if it encounters an error during a HTTP request. Defaults to true.
130130

131+
### Gradle Properties
132+
133+
The following properties can be set in your `gradle.properties` file:
134+
135+
#### embrace.disableMappingFileUpload
136+
137+
Set to `true` to disable the automatic upload of ProGuard/R8 mapping files and NDK symbol files. This is useful when using Embrace solely as an OTel exporter without sending data to Embrace's backend. Example:
138+
139+
```properties
140+
embrace.disableMappingFileUpload=true
141+
```
142+
131143
#### bytecodeInstrumentation.enabled
132144

133145
Global flag that overrides all others & decides whether Embrace should perform any bytecode instrumentation. Defaults to true.

docs/android/integration-advanced/crash-reporting.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ The Embrace SDK does not automatically capture NDK crash reports. To enable NDK
3232

3333
If you have obfuscated your application with ProGuard, DexGuard, or R8, the captured crashes will contain obfuscated method names. The Embrace
3434
Gradle plugin will automatically upload mapping files at build time to get you human-readable stacktraces from production.
35+
36+
:::info Configuration
37+
Mapping file uploads are skipped for debuggable builds or when API credentials are missing. You can control upload behavior with these Gradle properties:
38+
39+
- `embrace.disableMappingFileUpload=true` in `gradle.properties` to disable mapping file uploads entirely
40+
- `embrace.failBuildOnUploadErrors` (default: `true`) in the `embrace` DSL block to control whether upload failures break the build
41+
42+
For more details, see the [Embrace Gradle Plugin configuration](/android/configuration/embrace-gradle-plugin).
43+
:::

docs/flutter/integration/index.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,25 @@ import EmbraceCrash
4848
### Upload symbol files
4949

5050
:::info
51-
Embrace uploads your application's dSYM symbol files using a script bundled with the Embrace iOS SDK. This makes stacktraces from crashes human-readable.
51+
Embrace requires your application's dSYM symbol files to make stacktraces from crashes human-readable.
5252
:::
5353

54-
On the Xcode **Build Phases** tab, add a new run script. You can find your 5-character app ID and API token in the Embrace dashboard:
54+
On the Xcode **Build Phases** tab, add a new run script. You can find your 5-character app ID and API token in the Embrace dashboard.
55+
56+
If you are using CocoaPods, the `run.sh` script is bundled with the SDK:
5557

5658
```shell-session
5759
EMBRACE_ID={YOUR_APP_ID} EMBRACE_TOKEN={YOUR_API_TOKEN} "${PODS_ROOT}/EmbraceIO/run.sh"
5860
```
5961

62+
If you are using Swift Package Manager, you must download the support utility from https://downloads.embrace.io/embrace_support.zip, extract it, and place the scripts in your project:
63+
64+
```shell-session
65+
EMBRACE_ID={YOUR_APP_ID} EMBRACE_TOKEN={YOUR_API_TOKEN} "${SRCROOT}/path/to/your/run.sh"
66+
```
67+
68+
Also ensure that `DEBUG_INFORMATION_FORMAT` is set to `DWARF with dSYM File` in your Build Settings. For more details, see the [iOS dSYM Upload guide](/ios/6x/getting-started/dsym-upload).
69+
6070
## Android setup
6171

6272
In the root-level `build.gradle` file, add the `embrace-swazzler` dependency:

docs/ios/6x/getting-started/dsym-upload.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ When applications are uploaded to the App Store they are often stripped of symbo
1212
Starting on April 25, 2023 Apple requires all apps to be built with Xcode 14. Apple deprecated bitcode in Xcode 14. This means you may be unable to download dSYMs from Apple in the near future. We recommend that you setup automatic uploads. [Apple Announcement](https://developer.apple.com/news/?id=2ygwqlzd)
1313
:::
1414

15+
:::info Retroactive Symbolication
16+
Embrace performs symbolication server-side and retroactively. If a dSYM is uploaded after a crash has already been received, Embrace will automatically re-symbolicate older crashes when the matching dSYM arrives. This means you don't lose crash data if dSYMs are uploaded later.
17+
:::
18+
19+
## Prerequisites
20+
21+
Before setting up dSYM uploads, ensure your Xcode project is configured to generate dSYM files:
22+
23+
1. Select your project in the Project Navigator
24+
2. Select the appropriate target
25+
3. Go to **Build Settings** > **All**
26+
4. Search for **Debug Information Format**
27+
5. Set the value to **DWARF with dSYM File** (`dwarf-with-dsym`) for both Debug and Release configurations
28+
29+
If this setting is set to `dwarf` (without dSYM), no dSYM files will be generated and the upload script will skip the upload with a warning message.
30+
1531
## Automatic Uploads
1632

1733
Automatically uploading dSYM files is the recommended approach for symbolication. This ensures that crash reports are properly symbolicated without manual intervention.
@@ -95,11 +111,21 @@ If you are using GitHub Actions, you may instead use [embrace-io/action-symbol-u
95111

96112
If your crashes are not being symbolicated:
97113

98-
1. Verify that dSYM files are being generated in your build settings
114+
1. Verify that `DEBUG_INFORMATION_FORMAT` is set to `dwarf-with-dsym` in your build settings
99115
2. Check that the upload script is running successfully in your build logs
100116
3. Ensure your App ID and API Token are correct
101117
4. Verify that the dSYM files match the build that crashed
102118

119+
### Debug Mode
120+
121+
The upload script runs in the background by default, which means upload logs appear in your system logs rather than in Xcode's build output. If you need to troubleshoot upload issues, enable debug mode by adding `EMBRACE_DEBUG_DSYM=1` to your run script:
122+
123+
```bash
124+
EMBRACE_DEBUG_DSYM=1 EMBRACE_ID=YOUR_APP_ID EMBRACE_TOKEN=YOUR_API_TOKEN "${SRCROOT}/path/to/your/run.sh"
125+
```
126+
127+
In debug mode, the upload runs synchronously and all logs appear directly in the Xcode build output. This slows down the build, so only enable it while troubleshooting.
128+
103129
For more troubleshooting tips, see our [FAQ section](/ios/faq#troubleshooting-dsym-upload).
104130

105131
## Next Steps

docs/ios/best-practices/ci-dsym-upload.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ It's also possible to manually run the Embrace upload tool directly from a CI st
135135
The `APP_KEY` and `API_TOKEN` envvars should be retrieved from the Embrace dashboard.
136136

137137
```shell-session
138-
/path/to/EmbraceIO/embrace_symbol_upload.darwin -app $APP_KEY -token $API_TOKEN dsym_output.zip
138+
/path/to/EmbraceIO/embrace_symbol_upload.darwin --app $APP_KEY --token $API_TOKEN dsym_output.zip
139139
```
140140

141141
If the Embrace `embrace_symbol_upload.darwin` utility is in a known location you should use the existing binary. If it is non-deterministic or not included alongside the Embrace package itself, then you can download the utility directly.
142142

143143
```shell-session
144144
curl -o ./embrace_support.zip https://downloads.embrace.io/embrace_support.zip
145145
unzip ./embrace_support.zip
146-
./embrace_symbol_upload.darwin -app $APP_KEY -token $API_TOKEN dsym_output.zip
146+
./embrace_symbol_upload.darwin --app $APP_KEY --token $API_TOKEN dsym_output.zip
147147
```
148148

149149
## Working with Xcode Cloud
@@ -181,7 +181,7 @@ then
181181
unzip ./embrace_support.zip
182182

183183
# call Embrace upload tool
184-
./embrace_symbol_upload.darwin -app $APP_ID -token $EMBRACE_TOKEN ~/dsym_output.zip
184+
./embrace_symbol_upload.darwin --app $APP_ID --token $EMBRACE_TOKEN ~/dsym_output.zip
185185
fi
186186
```
187187

docs/product/settings/app-settings/dsym-symbols.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Available artifacts include:
1818

1919
Upload iOS/macOS dSYMs and view upload history. Valid dSYMs enable symbolicated crash stacks.
2020

21+
Embrace performs symbolication server-side and retroactively. When a dSYM is uploaded after crashes have already been received, Embrace automatically re-symbolicates those older crashes with the newly available symbols. This means crash grouping remains consistent regardless of when the dSYM was uploaded.
22+
2123
Developers can use DSYMs to:
2224

2325
- Ensure iOS crashes show symbolicated function names and files.

docs/react-native/5x/integration/upload-symbol-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Change the contents to the following:
3737
```shell-session
3838
export NODE_BINARY=node
3939
40-
export SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/main.jsbundle.map"; <-- Add this line
40+
export SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/main.jsbundle.map"; # <-- Add this line
4141
4242
../node_modules/react-native/scripts/react-native-xcode.sh
4343
```

0 commit comments

Comments
 (0)