Skip to content

Commit

Permalink
Updated dsym docs for server
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jun 7, 2017
1 parent fbb3fee commit c67d8af
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 43 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Expand Up @@ -2,6 +2,7 @@ Version 8.18 (Unreleased)
-------------------------

- Expanded resolution options to allow current and explicit versions.
- Removed support for global dsyms

Schema Changes
~~~~~~~~~~~~~~
Expand All @@ -11,6 +12,11 @@ Schema Changes
- Added Release.authors
- Added Release.total_deploys
- Added Release.last_deploy_id
- Removed DSymBundle
- Removed DSymObject
- Removed DSymSDK
- Removed DSymSymbol
- Removed GlobalDSymFile

Version 8.17
------------
Expand Down
65 changes: 22 additions & 43 deletions docs/dsym.rst
@@ -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>`__.

0 comments on commit c67d8af

Please sign in to comment.