Upload the dSYM File

Splunk AppDynamics requires the dSYM file for the application to produce human-readable stack traces for crash snapshots. For details about the importance of snapshots, see Get Human-Readable Crash Snapshots.

If you update the application, you are required to provide the new dSYM file for the new application version. The dSYM file contains a UUID that links it to a specific Xcode build, so Splunk AppDynamics can unambiguously match the correct dSYM file with an incoming crash report with no additional information.

To upload the dSYM file:

  1. Enable the dSYM file.

  2. Set up your environment to upload the file automatically each time you build or upload the file manually.

Enable the dSYM File

To enable the agent to provide human-readable information in the crash snapshots that are produced if the application crashes, compile with the DWARF with dSYM file option to create a debug symbols file for the application.

To enable dSYM:

  1. In Xcode, select your project in the Project Navigator.
  2. In the target list, select the target that builds your application.
  3. Select the Build Settings tab.
  4. In the Build Options section, make sure that the Debugging Information Format is set to DWARF with dSYM File.

ビルドごとに Splunk AppDynamics に dSYM ファイルを自動でアップロードする

dSYM ファイルのアップロードを自動化すると、ビルドのたびに必要な手動手順の数が削減され、すべてのビルドで適切な dSYM ファイルを Splunk AppDynamics が使用できるようになります。

開始する前に、xcode_build_dsym_upload.sh スクリプトをダウンロードします。

  1. Xcodeのプロジェクトナビゲータでプロジェクトを選択します。
  2. アプリケーションターゲットをクリックします。
  3. 設定エディタで[構築フェーズ]タブを選択します。
  4. メインパネルの左上隅にある [] アイコンをクリックします。
  5. ドロップダウンボックスから新しい[スクリプトの実行フェーズ]を選択します。
  6. スクリプトボックスで、次の行を追加します。
    export ADRUM_ACCOUNT_NAME="<Account_Name_HERE>" // From the View License - End User Monitoring section of the License Page
    export ADRUM_LICENSE_KEY="<License_Key_HERE>"  // From the View License - End User Monitoring section of the License Page
    SCRIPT=<Path of the xcode_build_dsym_upload.sh script>
    /bin/sh "${SCRIPT}"
  7. また、必要に応じて設定できるオプションパラメータもあります。これらを設定するには、上記の 2 番目の ステートメントの後に次の行を追加します。有効にするには 1、無効にするには 0 を設定します。
    export ADRUM_UPLOAD_WHEN_BUILT_FOR_SIMULATOR=0
    export ADRUM_TREAT_UPLOAD_FAILURES_AS_ERRORS=0
    export ADRUM_EUM_PROCESSOR="<EUM_SERVER_URL>"
    最後のステートメントは、「SaaS ベースの EUM アカウントの地域クラウドロケーション」またはオンプレミスサーバーの URL を設定するために使用する必要があります。

Manually Upload the dSYM File to Splunk AppDynamics

Get the dSYM file from Xcode

  1. In Xcode, run the Xcode build: Product > Build.
  2. View the log navigator: View > Navigators > Show Report Navigator.
    Note: Older versions of Xcode used Show Log Navigator.
  3. Click the log entry for the most recent build.
  4. Near the end of the log, find and mouse over the log entry named Generate <Your_App_Name>.app.dSYM .
  5. Click the button on the right side of the entry to expand it.The end of the displayed command is the path to the dSYM file.
  6. Navigate to this dSYM file in the Finder.
  7. Right-click on the dSYM file and choose Compress.
  8. Upload to Splunk AppDynamics the .zip file that Finder generates.

Upload the dSYM File to Splunk AppDynamics Using the UI

  1. From the Mobile App menu, click Configuration.
  2. Click Mobile App Configuration.
  3. Under dSYM Files, click the + icon.
  4. From the Upload Missing dSYM Mapping dialog, click Choose File.The uploader expects a file with a .zip extension.
  5. In the file browser, select the zipped dSYM file for your instrumented application.
  6. Click Upload.

Upload the dSYM File to Splunk AppDynamics Using the REST API

The API uses HTTP basic authentication. The username is your EUM account name and the password is your EUM license key.

Note: If you wish to disable this REST API and use the Controller API that uses the token-based upload, contact Splunk AppDynamics Support.

Set up your HTTP basic authentication credentials

  1. In the upper-right corner of the Controller UI, click Settings > License .

  2. From the Account Usage tab, swipe down to the User Experience section.
  3. Click Show next to License Key to display the EUM license key. This is your password for authentication.
  4. URL-encode the EUM account name and the EUM license key.

Send the dSYM File

Send the dSYM FileSend the dSYM as a zip archive in the body of a PUT -H Content-Type:application/octet-stream URI:

Americas
https://api.eum-appdynamics.com/v2/account/<EUM_Account_Name>/ios-dsym
EMEA
https://fra-api.eum-appdynamics.com/v2/account/<EUM_Account_Name>/ios-dsym
APAC
https://syd-api.eum-appdynamics.com/v2/account/<EUM_Account_Name>/ios-dsym

Sample Request and Response

This is a sample request and response using the REST API.

Upload Request

The following example uses curl to send a dSYMm file named UISampleApp.app.dSYM.zip. The EUM account name is "Example account" and the password is "Example-License-Key-4e8ec2ae6cfe", the EUM License Key. The plus signs replace spaces in the account name when the account name is URL-encoded.

Americas
curl -v -H Content-Type:application/octet-stream --upload-file UISampleApp.app.dSYM.zip --user Example account:Example-License-Key-4e8ec2ae6cfe https://api.eum-appdynamics.com/v2/account/Example+account/ios-dsym
EMEA
curl -v -H Content-Type:application/octet-stream --upload-file UISampleApp.app.dSYM.zip --user Example account:Example-License-Key-4e8ec2ae6cfe https://fra-api.eum-appdynamics.com/v2/account/Example+account/ios-dsym
APAC
curl -v -H Content-Type:application/octet-stream --upload-file UISampleApp.app.dSYM.zip --user Example account:Example-License-Key-4e8ec2ae6cfe https://syd-api.eum-appdynamics.com/v2/account/Example+account/ios-dsym

Upload Response

The successful output of the sample request looks like this:

Americas
* About to connect() to api.eum-appdynamics.com port 443 (#0)*   Trying ::1...
* connected
* Connected to api.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+Account/ios-dsym  HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: localhost:7001
> Accept: */*
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host api.eum-appdynamics.com left intact
* Closing connection #0
EMEA
* About to connect() to fra-api.eum-appdynamics.com port 443 (#0)*   Trying ::1...
* connected
* Connected to fra-api.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+Account/ios-dsym  HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: localhost:7001
> Accept: */*
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host fra-api.eum-appdynamics.com left intact
* Closing connection #0
APAC
* About to connect() to syd-api.eum-appdynamics.com port 443 (#0)*   Trying ::1...
* connected
* Connected to syd-api.eum-appdynamics.com (::1) port 443 (#0)
* Server auth using Basic with user 'Example+account'
> PUT /v2/account/Example+Account/ios-dsym  HTTP/1.1
> Authorization: Basic SW50ZXJuYWwrdGVzdCthY2NvdW50OlRlc3RBY2N0LTFlMzktNDVkMy05MzAzLTRlOGVjMmFlNmNmZQ==
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: localhost:7001
> Accept: */*
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(8.1.4.v20120524)
<
* Connection #0 to host syd-api.eum-appdynamics.com left intact
* Closing connection #0

Use the Token to Upload dSYMs with the REST API

Note: Ensure that the following property is enabled to use the token-based upload:
MAPPING_FILE_UPLOAD_API_DISABLED: True

Complete the following steps to upload the dSYMs file:

  1. Generate a token to upload the file:
    curl -L -X GET -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/fileUploadToken'
  2. Obtain the application ID:
    curl -L -X GET -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/getApplicationId/<App key>'
  3. Upload the dSYM file:
    curl -L -X POST -u <username>@<accountName>:<password> '<controller base url>/controller/restui/mobileRUMConfig/uploadDSYMPackageFile/<applicationID>?token=<token>'  -F 'fileData=@"<DSYM file PATH>"'

Check Uploaded dSYMs Using the REST API

You can check to make sure that your dSYMs have successfully uploaded using two REST APIs.

  1. Get a list of the UUIDs for the last 50 dSYMs you have uploaded.
  2. Check if a specific dSYM has been uploaded.

List of the Last 50 dSYMs Uploaded

The dsymQuery method allows you to retrieve a list of UUIDs for up to the last 50 dSYM files that have been uploaded to your account, along with the time they were uploaded. The response is displayed as JSON, by upload time, with the most recent first.

  1. Set up your authentication as described in Upload the dSYM File to Splunk AppDynamics Using the REST API.
  2. Create a GET request of the form:
    curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://<EUM_Cloud/Server_Host:Port>/v2/account/Example+account/crash-symbol-file-query/dsym

    - EUM_Cloud refers to SaaS-based EUM Cloud URLs. For a complete list, see Splunk AppDynamics SaaS SaaS Domains and IP Ranges.

    - EUM_Server_Host refers to the URL pointing to your on-premises EUM Server.

    - EUM_Account_Name is your EUM account name.

    - GUID_To_Check is the GUID of the ProGuard file in which you are interested.

    .

Sample Request

Americas
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe  https://api.eum-appdynamics.com:443/v2/account/Example+account/crash-symbol-file-query/dsym
EMEA
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe  https://fra-api.eum-appdynamics.com:443/v2/account/Example+account/crash-symbol-file-query/dsym
APAC
curl --user Example+account:Example-License-Key-4e8ec2ae6cfe  https://syd-api.eum-appdynamics.com:443/v2/account/Example+account/crash-symbol-file-query/dsym

Sample Response

{"dSymFiles":[
{"uploadTime":"mm/dd/yyyy 14:15:32","UUID2":"my_uuid2"},
{"uploadTime":"mm/dd/yyyy 14:15:32","UUID":"my_uuid"}
]}

Check for Specific dSYM by UUID

The checkForDSymFile method allows you to check if a specific dSYM by UUID has been uploaded. The upload time is returned in the response.

  1. Set up your authentication as described in Upload the dSYM File to Splunk AppDynamics Using the REST API.
  2. Create a GET request of the form:
    curl --user Example+account:Example-License-Key-4e8ec2ae6cfe https://<EUM_Cloud/Server_Host:Port>/v2/account/Example+account/crash-symbol-file-query/dsym/uuid/<UUID_to_Check>

    - EUM_Cloud refers to SaaS-based EUM Cloud URLs. For a complete list, see Splunk AppDynamics SaaS SaaS Domains and IP Ranges.

    - EUM_Server_Host refers to the URL pointing to your on-premises EUM Server.

    - EUM_Account_Name is your EUM account name.

    - GUID_To_Check is the GUID of the ProGuard file in which you are interested.

    .

    Sample Request

    curl --user Example+account:Example-License-Key-4e8ec2ae6cfe  https://<EUM_Cloud/Server_Host:Port>/v2/account/Example+account/crash-symbol-file-query/dsym/uuid/<UUID_to_Check>

    Sample Response

    {"uploadTime":"mm/dd/yyyy 14:15:32","UUID":"my_uuid"}