REST Resource: vitals.crashrate
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:CrashRateMetricSet
代表當機率指標集的單例資源。
這組指標包含當機資料和使用資料,可產生與使用者人數無關的正規化指標。
支援的匯總期間:
DAILY
:指標會以日曆日期間隔匯總。由於歷史限制,目前僅支援 America/Los_Angeles
時區。
HOURLY
:指標會以每小時為間隔匯總。預設時區為 UTC
,且僅支援此時區。
支援的指標:
crashRate
(google.type.Decimal
):匯總期間內,至少發生一次當機的獨立使用者百分比。
crashRate7dUserWeighted
(google.type.Decimal
):過去 7 天的crashRate
累計平均值。每日值會根據當天不重複使用者人數加權計算。不支援「每小時」細分。
crashRate28dUserWeighted
(google.type.Decimal
):過去 28 天的crashRate
累計平均值。每日值會根據當天不重複使用者人數加權計算。不支援「每小時」細分。
userPerceivedCrashRate
(google.type.Decimal
):在彙整期間,主動使用應用程式時至少感知到一次當機狀況的獨立使用者百分比。如果應用程式顯示任何活動或執行任何前景服務,系統會將應用程式視為處於主動使用狀態。
userPerceivedCrashRate7dUserWeighted
(google.type.Decimal
):過去 7 天的userPerceivedCrashRate
累計平均值。每日值會根據當天不重複使用者人數加權計算。不支援「每小時」細分。
userPerceivedCrashRate28dUserWeighted
(google.type.Decimal
):過去 28 天的userPerceivedCrashRate
累計平均值。每日值會根據當天不重複使用者人數加權計算。不支援「每小時」細分。
distinctUsers
(google.type.Decimal
):匯總期間內不重複使用者的數量,用於正規化 crashRate
和 userPerceivedCrashRate
指標。如果使用者在彙整期間積極使用應用程式,系統就會將他們計入這項指標。如果應用程式顯示任何活動或執行任何前景服務,系統會將應用程式視為處於主動使用狀態。請務必不要進一步匯總這項計數,否則可能會導致系統重複計算使用者。系統會根據值的大小,將值四捨五入至最接近的 10、100、1,000 或 1,000,000 倍數。
支援的尺寸:
apiLevel
(string
):使用者裝置上執行的 Android API 級別,例如 26.
versionCode
(int64
):使用者裝置上執行的應用程式版本。
deviceModel
(string
):使用者裝置型號的專屬 ID。識別碼格式為「deviceBrand/device」,其中 deviceBrand 對應於 Build.BRAND,device 則對應於 Build.DEVICE,例如「google/coral」。
deviceBrand
(string
):使用者裝置品牌的專屬 ID,例如 google。
deviceType
(string
):使用者裝置的類型 (也稱為板型規格),例如PHONE.
countryCode
(string
):根據使用者 IP 位址判斷的裝置國家/地區,以 2 個字母的 ISO-3166 代碼表示 (例如美國為「US」)。
deviceRamBucket
(int64
):裝置的 RAM (以 MB 為單位),以儲存區的形式 (3 GB、4 GB 等)。
deviceSocMake
(string
):裝置主要系統單晶片的製造商,例如 Samsung。參考資料
deviceSocModel
(string
):裝置主要系統單晶片的型號,例如 「Exynos 2100」。參考資料
deviceCpuMake
(string
):裝置 CPU 的製造商,例如 Qualcomm。
deviceCpuModel
(string
):裝置 CPU 型號,例如 「Kryo 240」。
deviceGpuMake
(string
):裝置 GPU 的製造商,例如 ARM。
deviceGpuModel
(string
):裝置 GPU 的型號,例如 馬利。
deviceGpuVersion
(string
):裝置 GPU 的版本,例如 T750。
deviceVulkanVersion
(string
):裝置的 Vulkan 版本,例如 「4198400」。
deviceGlEsVersion
(string
):裝置的 OpenGL ES 版本,例如 「196610」。
deviceScreenSize
(string
):裝置的螢幕大小,例如 NORMAL、LARGE。
deviceScreenDpi
(string
):裝置的螢幕密度,例如 mdpi、hdpi。
必要權限:如要存取這項資源,呼叫使用者必須具備應用程式的「查看應用程式資訊 (唯讀)」權限。
相關指標組合:
JSON 表示法 |
{
"name": string,
"freshnessInfo": {
object (FreshnessInfo )
}
} |
欄位 |
name |
string
ID。資源名稱。 格式:apps/{app}/crashRateMetricSet
|
freshnessInfo |
object (FreshnessInfo )
這項資源的資料更新間隔摘要。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThe CrashRateMetricSet resource provides normalized crash rate metrics for your app, combining crash data with usage data to provide insights independent of user counts.\u003c/p\u003e\n"],["\u003cp\u003eIt offers various crash rate metrics, including overall crash rate, user-perceived crash rate, and rolling averages, along with the distinct user count used for normalization.\u003c/p\u003e\n"],["\u003cp\u003eYou can analyze these metrics by dimensions like API level, version code, device model, country, and more to identify specific areas impacting your app's stability.\u003c/p\u003e\n"],["\u003cp\u003eData is aggregated daily (in PST) or hourly (in UTC) and requires the "View app information (read-only)" permission for access.\u003c/p\u003e\n"],["\u003cp\u003eFor unnormalized crash counts and information on ANR rates, refer to the related \u003ccode\u003evitals.errors\u003c/code\u003e metric sets.\u003c/p\u003e\n"]]],["The `CrashRateMetricSet` resource provides normalized crash metrics for apps, incorporating user data for accurate analysis. Metrics include `crashRate`, user-weighted rolling averages (7d, 28d), and `distinctUsers`. Data can be aggregated daily (America/Los_Angeles timezone) or hourly (UTC timezone). Dimensions for filtering include `apiLevel`, `versionCode`, device details (model, brand, type), `countryCode`, and more. Methods include retrieving the metric set's properties (`get`) and querying the metrics (`query`). To get this data you will need view app information permission.\n"],null,["# REST Resource: vitals.crashrate\n\n- [Resource: CrashRateMetricSet](#CrashRateMetricSet)\n - [JSON representation](#CrashRateMetricSet.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CrashRateMetricSet\n----------------------------\n\nSingleton resource representing the set of crashrate metrics.\n\nThis metric set contains crashes data combined with usage data to produce a normalized metric independent of user counts.\n\n**Supported aggregation periods:**\n\n- [DAILY](/play/developer/reporting/reference/rest/v1beta1/AggregationPeriod#ENUM_VALUES.DAILY): metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`.\n- [HOURLY](/play/developer/reporting/reference/rest/v1beta1/AggregationPeriod#ENUM_VALUES.HOURLY): metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`.\n\n**Supported metrics:**\n\n- `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash.\n- `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity.\n- `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity.\n- `userPerceivedCrashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash while they were actively using your app (a user-perceived crash). An app is considered to be in active use if it is displaying any activity or executing any foreground service.\n- `userPerceivedCrashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity.\n- `userPerceivedCrashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity.\n- `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` and `userPerceivedCrashRate` metrics. A user is counted in this metric if they used the app actively during the aggregation period. An app is considered to be in active use if it is displaying any activity or executing any foreground service. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.\n\n**Supported dimensions:**\n\n- `apiLevel` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): the API level of Android that was running on the user's device, e.g., 26.\n- `versionCode` ([int64](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.int64_value)): version of the app that was running on the user's device.\n- `deviceModel` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral.\n- `deviceBrand` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): unique identifier of the user's device brand, e.g., google.\n- `deviceType` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): the type (also known as form factor) of the user's device, e.g., PHONE.\n- `countryCode` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States).\n- `deviceRamBucket` ([int64](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.int64_value)): RAM of the device, in MB, in buckets (3GB, 4GB, etc.).\n- `deviceSocMake` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER)\n- `deviceSocModel` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL)\n- `deviceCpuMake` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Make of the device's CPU, e.g., Qualcomm.\n- `deviceCpuModel` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Model of the device's CPU, e.g., \"Kryo 240\".\n- `deviceGpuMake` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Make of the device's GPU, e.g., ARM.\n- `deviceGpuModel` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Model of the device's GPU, e.g., Mali.\n- `deviceGpuVersion` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Version of the device's GPU, e.g., T750.\n- `deviceVulkanVersion` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Vulkan version of the device, e.g., \"4198400\".\n- `deviceGlEsVersion` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): OpenGL ES version of the device, e.g., \"196610\".\n- `deviceScreenSize` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Screen size of the device, e.g., NORMAL, LARGE.\n- `deviceScreenDpi` ([string](/play/developer/reporting/reference/rest/v1beta1/anomalies#DimensionValue.FIELDS.string_value)): Screen density of the device, e.g., mdpi, hdpi.\n\n**Required permissions** : to access this resource, the calling user needs the *View app information (read-only)* permission for the app.\n\n**Related metric sets:**\n\n- [vitals.errors](/play/developer/reporting/reference/rest/v1beta1/vitals.errors.counts#ErrorCountMetricSet) contains unnormalized version (absolute counts) of crashes.\n- [vitals.errors](/play/developer/reporting/reference/rest/v1beta1/vitals.anrrate#AnrRateMetricSet) contains normalized metrics about ANRs, another stability metric.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"freshnessInfo\": { object (/play/developer/reporting/reference/rest/v1beta1/FreshnessInfo) } } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Identifier. The resource name. Format: apps/{app}/crashRateMetricSet |\n| `freshnessInfo` | `object (`[FreshnessInfo](/play/developer/reporting/reference/rest/v1beta1/FreshnessInfo)`)` Summary about data freshness in this resource. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------|---------------------------------------------|\n| ### [get](/play/developer/reporting/reference/rest/v1beta1/vitals.crashrate/get) | Describes the properties of the metric set. |\n| ### [query](/play/developer/reporting/reference/rest/v1beta1/vitals.crashrate/query) | Queries the metrics in the metric set. |"]]