Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,32 @@ | ||
DSym Management | ||
=============== | ||
System Debug Symbols | ||
==================== | ||
|
||
Sentry is currently in the process of receiving DSym support (beginning | ||
with iOS, tvOS, and macOS). For some of these platforms it can become | ||
necessary to ingest system symbol information to receive good stacktraces. | ||
This process is currently quite involved due to the nature of the apple | ||
platform. | ||
Sentry provides support for system wide debug symbols through a separate | ||
symbol server. Currently you need to self host a symbol server if you | ||
want to provide system symbols for your application. | ||
|
||
This here is meant as a general guide to how system symbols are processed | ||
and how you can extract and add symbols from Apple SDKs. | ||
It requires an S3 bucket where symbols are synchronized from. | ||
|
||
Apple Symbol Extraction | ||
Installing Symbolserver | ||
----------------------- | ||
|
||
Apple does not provide system symbols for download. In fact the symbols | ||
are actually contained on running i-devices. While it is impossible for | ||
the device itself to access that data, Xcode will extract the symbols from | ||
a device internal cache and re-assemble dsym files from it. We can then | ||
take those re-assembled dsym files and extract the symbols from it. | ||
The symbolserver can be found in the `getsentry/symbolserver | ||
<https://github.com/getsentry/symbolserver>`__ git repository. You can | ||
find information about how to install and configure it there. | ||
|
||
Sentry uses a library for this called `symsynd | ||
<https://github.com/getsentry/symsynd>`__ which provides a script named | ||
`extract-all.py` which can process these files. | ||
Configuration | ||
------------- | ||
|
||
To extract and process symbols do this: | ||
To enable the symbolserver you need to enable the ``symbolserer.enabled`` | ||
option and provide some options to where the symbol server runs:: | ||
|
||
1. connect an i-device (like an iPod) running the version of the | ||
operating system you want to extract the symbols of. | ||
2. launch Xcode and the device manager there. It might be necesssary to | ||
"use this device or development". | ||
3. wait for Xcode to finish processing the device. | ||
4. go to `~/Library/Developer/Xcode/iOS DeviceSupport` (or tvOS etc.) | ||
5. ensure a folder there was created for the version of iOS you are | ||
running. | ||
6. run `extract-all.py`:: | ||
symbolserver.enabled: true | ||
symbolserver.options: | ||
url: http://127.0.0.1:3000 | ||
|
||
$ python extract-all.py --sdk iOS "~/Library/Developer/Xcode/iOS DeviceSupport/X.Y.Z (XXXXX)" | ||
Symbol Extraction | ||
----------------- | ||
|
||
This will create a zipfile named ``X.Y.Z (XXXXX).zip`` in your current | ||
folder with extracted and preprocessed files. If you are extracting for | ||
tvOS you need to provide `tvOS` as SDK. | ||
|
||
Import Symbols | ||
-------------- | ||
|
||
Symbols can be imported from processed zip files with the help of the | ||
``sentry`` command line utility:: | ||
|
||
sentry dsym import-system-symbols /path/to/*.zip | ||
|
||
By default symbols are imported untrimmed but if you want to save some | ||
space you can run it with `--trim-symbols`. | ||
The symbolserver also comes with a tool to extract system symbols on your | ||
mac. For more information consult the `symbolserver readme | ||
<https://github.com/getsentry/symbolserver>`__. |