Exporting Diagnostics Data

Important

Visual Studio App Center is scheduled for retirement on March 31, 2025. While you can continue to use Visual Studio App Center until it is fully retired, there are several recommended alternatives that you may consider migrating to.

Learn more about support timelines and alternatives.

This article walks you through how to export data per your user request. To export data, you have two options:

  1. Use Azure Blob Storage
  2. Call our APIs for specific crash/error information

Use Azure Blob Storage

Export all your errors and symbolicated crashes, including stack traces and attachments, to Azure Blog Storage. You need an Azure subscription to export your data to Azure Blob Storage. You can learn more about how App Center works with Azure Blob Storage in the App Center Export documentation.

To export Diagnostics data to Blob Storage, call the following App Center API:

POST https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/export_configurations

Use one of the following payloads to export your crashes to Azure Blob Storage:

Payload for Standard Export :

{
  "type" : "blob_storage_linked_subscription",
  "subscription_id": "<Your-Azure-Subscription-ID",
  "export_entities": [ "crashes" ]
}

Payload for Custom Export :

{
  "type" : "blob_storage_connection_string",
  "connection_string": "<Your-blob-storage-connection-string",
  "export_entities": [ "crashes" ]
}

To find the location in blob storage, call the following App Center API:

GET https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/export_configurations

Call our APIs for specific crash/error information

These are the different APIs you must call to export the associated Diagnostics information.

1. GET the crash/error log metadata for every crash/error in a crash/error group by calling:

https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/errorGroups/{errorGroupId}/errors

2. GET the stacktrace by calling:

https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/errorGroups/{errorGroupId}/stacktrace

3. GET any recorded events by calling:

https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/session_logs

4. GET any attachments IDs by calling:

https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments
  1. If this is a text attachment, you can GET the text by calling:
https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments/{attachmentId}/text
  1. If this is a binary attachment, you can GET URI location by calling:
https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments/{attachmentIdd}/location

How to provide a copy of this data to my users

Prerequisite: The following process requires you have a way to map the App Center install IDs and your users.

To provide a specific user with their data, you must search the exported data and copy the logs with a specific install ID in a different file. That file will contain all the data that has been exported corresponding to that specific user.