调用PCTrend接口查看崩溃趋势。
请求参数
Query
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
Action | String | 是 | PCCrashTrend | 请求名称 |
Version | String | 是 | 2022-10-28 | 请求版本 |
Body
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
app_id | i32 | 是 | 12345 | App ID |
start_time | i32 | 是 | 1656288235 | 开始时间 |
end_time | i32 | 是 | 1656288235 | 结束时间 |
granularity | i32 | 是 | 30 | 聚合力度,单位为秒 |
issue_ids | array of string | 否 | ["bf1b6a03a99"] | 统计崩溃ID列表 |
filters | object of filters | 否 | - | 过滤条件 |
region | string | 否 | cn | 区域,默认cn |
issue_states | array of string | 否 | ["unassigned"] | 过滤崩溃处理状态列表 |
issue_managers | array of string | 否 | ["zhangsan"] | 过滤崩溃管理人列表 |
crash_time_type | string | 否 | server_time | 崩溃处理状态 |
is_first_issue | boolean | 否 | false | 是否为新发现的issue |
issue_levels | array of string | 否 | [] | 过滤issue等级 |
search_type | i32 | 否 | 1 | 堆栈过滤方式0:字符串 1:正则 |
tag_op | string | 否 | not_in | tag过滤方式not_in:不包含in:包含 |
issue_tags | array of issue_tags | 否 | [{group_id: 99, tag_id: 146}] | tag列表 |
search_text | string | 否 | stack info | 堆栈过滤字段 |
group_by_field | string | 否 | channel | 分组字段,为空不分组 |
crash_type | string | 否 | "" | 崩溃类型,pc_jank或者空 |
filters
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
type | string | 否 | and | 条件类型andor |
op | string | 否 | in | 查找类型in>< |
dimension | string | 否 | dim1 | 过滤维度 |
values | array of string | 否 | ["1", "2"] | 维度值 |
sub_conditions | array of sub_conditions | 否 | [ { "dimension": "parse_success", "op": "in", "values": [ "1" ], "groupKey": "dimension" } ] | 具体条件 |
issue_tags
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
tag_id | i32 | 否 | 1 | 标签ID |
group_id | i32 | 否 | 1 | 标签组ID |
sub_conditions
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|
type | string | 否 | and | 条件类型andor |
op | string | 否 | in | 查找类型in>< |
dimension | string | 否 | dim1 | 过滤维度 |
values | array of string | 否 | ["1", "2"] | 维度值 |
sub_conditions | array of string | 否 | [ { "dimension": "parse_success", "op": "in", "values": [ "1" ], "groupKey": "dimension" } ] | 具体条件 |
返回参数
参数 | 类型 | 示例值 | 描述 |
---|
data | object of data | - | 返回数据 |
errmsg | string | "" | 错误信息,成功为空 |
errno | i32 | 200 | 错误码,成功为200 |
data
参数 | 类型 | 示例值 | 描述 |
---|
error_trend | object of error_trend | - | 崩溃错误趋势 |
user_trend | object of user_trend | - | 崩溃影响用户趋势 |
error_rate_trend | object of error_rate_trend | - | 崩溃错误率趋势 |
user_rate_trend | object of user_rate_trend | - | 崩溃影响用户率 |
error_total | i32 | 10 | 总错误数 |
user_total | i32 | 4 | 总影响用户数 |
error_rate_total | double | 0.01 | 总错误率 |
user_rate_total | double | 0.3 | 总影响用户率 |
group_by_list | array of group_by_list | [{field: "channel", description: "渠道"}] | 可用分组字段 |
user_rate_total_avg | double | 0.24 | 加权平均影响用户率 |
error_trend
参数 | 类型 | 示例值 | 描述 |
---|
dimensions | array of dimensions | [{name: "start_time", type: "time"}] | 维度列表 |
source | array of string | [{start_time: 1665331200}] | 数据列表 |
user_trend
参数 | 类型 | 示例值 | 描述 |
---|
dimensions | array of dimensions | [{name: "start_time", type: "time"}] | 维度列表 |
source | array of string | [{start_time: 1665331200}] | 数据列表 |
error_rate_trend
参数 | 类型 | 示例值 | 描述 |
---|
dimensions | array of dimensions | [{name: "start_time", type: "time"}] | 维度列表 |
source | array of string | [{start_time: 1665331200}] | 数据列表 |
user_rate_trend
参数 | 类型 | 示例值 | 描述 |
---|
dimensions | array of dimensions | [{name: "start_time", type: "time"}] | 维度列表 |
source | array of string | [{start_time: 1665331200}] | 数据列表 |
group_by_list
参数 | 类型 | 示例值 | 描述 |
---|
field | string | channel | 字段名 |
description | string | 渠道 | 展示名 |
dimensions
参数 | 类型 | 示例值 | 描述 |
---|
name | string | cpu | 维度名 |
type | string | string | 维度值类型timestringint |
示例
请求示例
POST /?Action=PCCrashTrend&Version=2022-10-28
{
"app_id": 12345,
"start_time": 1656288235,
"end_time": 1656288235,
"granularity": 30,
"issue_levels": [],
"group_by_field": "channel",
"issue_states": [
"unassigned"
],
"issue_tags": [
{
"group_id": 1,
"tag_id": 1
}
],
"crash_time_type": "server_time",
"filters": {
"values": [
"1",
"2"
],
"sub_conditions": [
{
"dimension": "parse_success",
"op": "in",
"values": [
"1"
],
"groupKey": "dimension"
}
],
"type": "and",
"op": "in",
"dimension": "dim1"
},
"search_text": "stack info",
"issue_managers": [
"zhangsan"
],
"tag_op": "not_in",
"region": "cn",
"search_type": 1,
"is_first_issue": false,
"crash_type": "",
"issue_ids": [
"bf1b6a03a99"
]
}
正常返回示例
{
"errmsg": "",
"errno": 200,
"data": {
"group_by_list": [
{
"field": "channel",
"description": "渠道"
}
],
"user_rate_total": 0.3,
"user_rate_trend": {
"source": "[{start_time: 1665331200}]",
"dimensions": [
{
"type": "string",
"name": "start_time"
}
]
},
"user_trend": {
"dimensions": [
{
"name": "start_time",
"type": "string"
}
],
"source": "[{start_time: 1665331200}]"
},
"user_rate_total_avg": 0.24,
"error_trend": {
"dimensions": [
{
"name": "start_time",
"type": "string"
}
],
"source": "[{start_time: 1665331200}]"
},
"error_rate_trend": {
"dimensions": [
{
"type": "string",
"name": "start_time"
}
],
"source": "[{start_time: 1665331200}]"
},
"error_rate_total": 0.01,
"error_total": 10,
"user_total": 4
}
}
异常返回示例
{
"ResponseMetadata": {
"RequestId": "201806041104200100100232280022D30",
"Action": "PCCrashTrend",
"Version": "2022-10-28",
"Service": "***",
"Region": "cn-north-1",
"Error": {
"Code": "200000",
"Message": "参数异常"
}
}
}