Skip to content

Commit 518986b

Browse files
authored
feat(dart): Add info about dart_symbol_map_path (#15302)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR This PR focuses on documenting a new feature for Flutter ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 969f7b9 commit 518986b

File tree

2 files changed

+33
-15
lines changed

2 files changed

+33
-15
lines changed

platform-includes/debug-symbols/dart-plugin/dart.flutter.mdx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ sentry:
2424
project: ___PROJECT_SLUG___
2525
org: ___ORG_SLUG___
2626
auth_token: ___ORG_AUTH_TOKEN___
27-
# Disable automatic upload of debug symbols
28-
# upload_debug_symbols: false
27+
# Absolute or relative path to the Dart symbol map file
28+
# Used to make obfuscated Flutter issue titles readable on iOS and Android
29+
# See the "Building Your Application" section below for more details on how to generate the symbol map file
30+
# Available since version 3.2.0 of the Sentry Dart Plugin
31+
dart_symbol_map_path: build/app/obfuscation.map.json
2932
# ___PRODUCT_OPTION_START___ source-context
3033
# Enable source context
3134
upload_sources: true
@@ -52,12 +55,17 @@ For more information, read the [Sentry Dart Plugin README](https://github.com/ge
5255

5356
Before running the plugin, build your Flutter application with one of the following commands. Obfuscated is encouraged for production builds, and will make uploading debug symbols necessary to get readable stack traces.
5457

58+
<Alert>
59+
The `--extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json` option is required to generate the symbol map file which is used to make the obfuscated Flutter issue titles readable on iOS and Android.
60+
Make sure to set the `dart_symbol_map_path` option in your `pubspec.yaml` file to the path of the `obfuscation.map.json` file.
61+
</Alert>
62+
5563
```bash {tabTitle: Obfuscated}
56-
flutter build apk --obfuscate --split-debug-info=<output-directory>
57-
flutter build ios --obfuscate --split-debug-info=<output-directory>
58-
flutter build macos --obfuscate --split-debug-info=<output-directory>
59-
flutter build windows --obfuscate --split-debug-info=<output-directory>
60-
flutter build linux --obfuscate --split-debug-info=<output-directory>
64+
flutter build apk --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
65+
flutter build ios --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
66+
flutter build macos --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
67+
flutter build windows --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
68+
flutter build linux --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
6169
```
6270

6371
```bash {tabTitle: Flutter Web}
@@ -83,7 +91,7 @@ If you don't obfuscate your build, the plugin won't upload debug symbols. Additi
8391

8492
## Android ProGuard Integration
8593

86-
If you have ProGuard (`minifyEnabled`) enabled, you must upload Android Proguard/R8 mapping files. You have two options:
94+
If you have ProGuard (`minifyEnabled`) enabled and you want to see proper native Android stacktraces, you must upload Android Proguard/R8 mapping files. You have two options:
8795

8896
1. **Use the Sentry Android Gradle Plugin (Recommended)**
8997

@@ -125,6 +133,7 @@ The following table lists all available configuration options for the Sentry Dar
125133
| `upload_debug_symbols` | boolean | `true` | Enables or disables automatic upload of debug symbols | |
126134
| `upload_source_maps` | boolean | `false` | Enables or disables automatic upload of source maps | |
127135
| `upload_sources` | boolean | `false` | Enables or disables source code upload | |
136+
| `dart_symbol_map_path` | string | | Absolute or relative path to the Dart symbol map file used to make obfuscated Flutter issue titles readable on iOS and Android | |
128137
| `url` | string | | The URL of your Sentry instance | `SENTRY_URL` |
129138
| `url_prefix` | URL prefix for JS source maps | e.g. ~/app/ (string) | no | - |
130139
| `wait_for_processing` | boolean | `false` | Whether to wait for server-side processing of uploaded files | |

platform-includes/debug-symbols/dart-plugin/dart.mdx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ sentry:
2424
project: ___PROJECT_SLUG___
2525
org: ___ORG_SLUG___
2626
auth_token: ___ORG_AUTH_TOKEN___
27-
# Disable automatic upload of debug symbols
28-
# upload_debug_symbols: false
27+
# Absolute or relative path to the Dart symbol map file
28+
# Used to make obfuscated Flutter issue titles readable on iOS and Android
29+
# See the "Building Your Application" section below for more details on how to generate the symbol map file
30+
# Available since version 3.2.0 of the Sentry Dart Plugin
31+
dart_symbol_map_path: build/app/obfuscation.map.json
2932
# ___PRODUCT_OPTION_START___ source-context
3033
# Enable source context
3134
upload_sources: true
@@ -52,12 +55,17 @@ For more information, read the [Sentry Dart Plugin README](https://github.com/ge
5255

5356
Before running the plugin, build your Flutter application with one of the following commands. Obfuscated is encouraged for production builds, and will make uploading debug symbols necessary to get readable stack traces.
5457

58+
<Alert>
59+
The `--extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json` option is required to generate the symbol map file which is used to make the obfuscated Flutter issue titles readable on iOS and Android.
60+
Make sure to set the `dart_symbol_map_path` option in your `pubspec.yaml` file to the path of the `obfuscation.map.json` file.
61+
</Alert>
62+
5563
```bash {tabTitle: Obfuscated}
56-
flutter build apk --obfuscate --split-debug-info=<output-directory>
57-
flutter build ios --obfuscate --split-debug-info=<output-directory>
58-
flutter build macos --obfuscate --split-debug-info=<output-directory>
59-
flutter build windows --obfuscate --split-debug-info=<output-directory>
60-
flutter build linux --obfuscate --split-debug-info=<output-directory>
64+
flutter build apk --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
65+
flutter build ios --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
66+
flutter build macos --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
67+
flutter build windows --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
68+
flutter build linux --obfuscate --split-debug-info=<output-directory> --extra-gen-snapshot-options=--save-obfuscation-map=build/app/obfuscation.map.json
6169
```
6270

6371
```bash {tabTitle: Flutter Web}
@@ -125,6 +133,7 @@ The following table lists all available configuration options for the Sentry Dar
125133
| `upload_debug_symbols` | boolean | `true` | Enables or disables automatic upload of debug symbols | |
126134
| `upload_source_maps` | boolean | `false` | Enables or disables automatic upload of source maps | |
127135
| `upload_sources` | boolean | `false` | Enables or disables source code upload | |
136+
| `dart_symbol_map_path` | string | | Absolute or relative path to the Dart symbol map file used to make obfuscated Flutter issue titles readable on iOS and Android | |
128137
| `url` | string | | The URL of your Sentry instance | `SENTRY_URL` |
129138
| `url_prefix` | URL prefix for JS source maps | e.g. ~/app/ (string) | no | - |
130139
| `wait_for_processing` | boolean | `false` | Whether to wait for server-side processing of uploaded files | |

0 commit comments

Comments
 (0)