Method: vitals.crashrate.query
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://playdeveloperreporting.googleapis.com/v1beta1/{name=apps/*/crashRateMetricSet}:query
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。资源名称。 格式:apps/{app}/crashRateMetricSet
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"timelineSpec": {
object (TimelineSpec )
},
"dimensions": [
string
],
"metrics": [
string
],
"filter": string,
"pageSize": integer,
"pageToken": string,
"userCohort": enum (UserCohort )
} |
字段 |
timelineSpec |
object (TimelineSpec )
时间轴聚合参数的规范。 支持的汇总周期:
DAILY :指标按日历日期间隔进行汇总。由于历史限制,默认且唯一支持的时区是 America/Los_Angeles 。
HOURLY :指标以小时为间隔进行汇总。默认时区也是唯一受支持的时区是 UTC 。
|
dimensions[] |
string
用于对指标进行切分的维度。 支持的维度:
apiLevel (string ):用户设备上运行的 Android API 级别,例如 26.
versionCode (int64 ):用户设备上运行的应用版本。
deviceModel (string ):用户设备型号的唯一标识符。标识符的格式为“deviceBrand/device”,其中 deviceBrand 对应于 Build.BRAND,device 对应于 Build.DEVICE,例如 google/coral。
deviceBrand (string ):用户设备品牌的唯一标识符,例如 google。
deviceType (string ):用户设备的类型(也称为设备规格),例如 PHONE。
countryCode (string ):用户设备的国家/地区(根据其 IP 地址确定),以 2 字母 ISO-3166 代码表示(例如,美国为“US”)。
deviceRamBucket (int64 ):设备的 RAM,以 MB 为单位,以分桶方式表示(3GB、4GB 等)。
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。
|
metrics[] |
string
要聚合的指标。 支持的指标:
crashRate (google.type.Decimal ):在汇总期内遇到至少一次崩溃的不同用户所占的百分比。
crashRate7dUserWeighted (google.type.Decimal ):过去 7 天内 crashRate 的滚动平均值。每日值会根据当天的唯一身份用户数进行加权。
crashRate28dUserWeighted (google.type.Decimal ):过去 28 天内 crashRate 的滚动平均值。每日值会根据当天的唯一身份用户数进行加权。不支持小时级粒度。
userPerceivedCrashRate (google.type.Decimal ):在汇总期内,在主动使用应用期间遇到过至少 1 次崩溃(用户感知的崩溃)的不同用户所占的百分比。如果应用显示任何 activity 或执行任何前台服务,即被视为处于活跃使用状态。
userPerceivedCrashRate7dUserWeighted (google.type.Decimal ):过去 7 天内 userPerceivedCrashRate 的滚动平均值。每日值会根据当天的唯一身份用户数进行加权。不支持小时级粒度。
userPerceivedCrashRate28dUserWeighted (google.type.Decimal ):过去 28 天内 userPerceivedCrashRate 的滚动平均值。每日值会根据当天的唯一身份用户数进行加权。不支持小时级粒度。
distinctUsers (google.type.Decimal ):在汇总周期内,用作 crashRate 和 userPerceivedCrashRate 指标的归一化值的不同用户数。如果用户在汇总期内积极使用应用,则此指标会统计该用户。如果应用显示任何 activity 或执行任何前台服务,即被视为处于活跃使用状态。请务必注意,不要进一步汇总此数量,否则可能会导致用户被多次统计。该值会舍入为最接近的 10、100、1,000 或 1,000,000 的倍数,具体取决于该值的大小。
|
filter |
string
要应用于数据的过滤条件。过滤表达式遵循 AIP-160 标准,并支持按所有细分维度的相等性进行过滤。
|
pageSize |
integer
返回的数据的大小上限。 如果未指定,则最多返回 1, 000 行。最大值为 100,000;大于 100,000 的值会强制转换为 100,000。
|
pageToken |
string
从之前的调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,提供给请求的所有其他参数必须与提供页面令牌的调用相一致。
|
userCohort |
enum (UserCohort )
要选择的用户视图。输出数据将与所选视图相对应。 支持的值:
|
响应正文
crashrate.query
的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"rows": [
{
object (MetricsRow )
}
],
"nextPageToken": string
} |
字段 |
rows[] |
object (MetricsRow )
返回的数据行。
|
nextPageToken |
string
用于获取下一页数据的延续令牌。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/playdeveloperreporting
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eQueries the Crash Rate metric set to analyze app stability across dimensions like API level, device model, and country.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering data by specific dimensions and supports daily or hourly aggregation periods with corresponding timezones.\u003c/p\u003e\n"],["\u003cp\u003eReturns crash rate metrics, including overall crash rate, user-perceived crash rate, and distinct user counts.\u003c/p\u003e\n"],["\u003cp\u003eOffers optional pagination for large datasets and requires the \u003ccode\u003ehttps://www.googleapis.com/auth/playdeveloperreporting\u003c/code\u003e authorization scope.\u003c/p\u003e\n"]]],["This document details how to query crash rate metrics using a POST request to `https://playdeveloperreporting.googleapis.com/v1beta1/{name=apps/*/crashRateMetricSet}:query`. The request requires a `name` path parameter. The request body specifies `timelineSpec`, `dimensions` (e.g., `apiLevel`, `deviceModel`), `metrics` (e.g., `crashRate`, `distinctUsers`), optional `filter`, `pageSize`, `pageToken`, and `userCohort`. The response contains `rows` of metric data and a `nextPageToken` for pagination. Requires OAuth scope `https://www.googleapis.com/auth/playdeveloperreporting`.\n"],null,[]]