匯出診斷數據

重要

Visual Studio App Center 已排定於 2025 年 3 月 31 日淘汰。 雖然您可以繼續使用 Visual Studio App Center,直到完全淘汰為止,但有數個建議的替代方案可以考慮移轉至。

深入瞭解支持時程表和替代方案。

本文將逐步引導您逐步解說如何根據使用者要求導出數據。 若要匯出資料,您有兩個選項:

  1. 使用 Azure Blob 儲存體
  2. 針對特定損毀/錯誤資訊呼叫我們的 API

使用 Azure Blob 儲存體

將所有錯誤和符號化當機,包括堆疊追蹤和附件匯出至 Azure 部落格記憶體。 您需要 Azure 訂用帳戶,才能將數據匯出至 Azure Blob 儲存體。 您可以在 App Center 匯出檔中深入瞭解 App Center 如何與 Azure Blob 儲存體 搭配運作。

若要將診斷數據匯出至 Blob 記憶體,請呼叫下列 App Center API:

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

使用下列其中一個承載,將損毀導出至 Azure Blob 儲存體:

標準導出的承載:

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

自訂匯出的承載:

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

若要在 Blob 記憶體中尋找位置,請呼叫下列 App Center API:

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

針對特定損毀/錯誤資訊呼叫我們的 API

這些是您必須呼叫的不同 API,才能匯出相關聯的診斷資訊。

1.藉由呼叫,取得當機/錯誤群組中每個損毀/錯誤之損毀/錯誤記錄檔元數據:

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

2.呼叫下列方法取得 stacktrace:

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

3.呼叫下列專案以取得任何記錄的事件:

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

4.呼叫來取得任何附件標識碼:

https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments
  1. 如果這是文字附件,您可以藉由呼叫來取得文字:
https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments/{attachmentId}/text
  1. 如果這是二進位附件,您可以呼叫下列專案來取得 URI 位置:
https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/errors/{errorId}/attachments/{attachmentIdd}/location

如何提供此數據的複本給我的使用者

前提: 下列程式需要您有辦法對應 App Center 安裝識別碼和使用者。

若要提供特定用戶的數據,您必須搜尋導出的數據,並在不同的檔案中複製具有特定安裝標識碼的記錄。 該檔案將包含已匯出至該特定使用者的所有數據。