You need to enable JavaScript to run this app.
导航

AppTraceLogs

最近更新时间2024.02.28 17:59:56

首次发布时间2022.10.14 11:52:07

调用AppTraceLogs接口查询单点日志。

使用说明

  • 接口名称:AppTraceLogs
  • 请求方式:POST
  • 接口地址:/?Action=AppTraceLogs&Version=2022-10-12

请求参数

Query

参数

类型

是否必选

示例值

描述

Action

String

AppTraceLogs

请求名称。

Version

String

2022-10-12

请求版本。

ServiceName : apmplus_openapi
Region : cn-beijing 
X-App-Ids : xxx
Content-Type : application/json

Body

参数

类型

是否必填

示例值

说明

id_type

string

user_id

单点ID类型。

  • did:设备ID
  • ssid:session ID
  • user_id:用户ID

id_value

string

test_dddd

ID值。

start_time

int32

1658811276

开始时间。

end_time

int32

1658840076

结束时间。

log_types

string

15

查询日志类型。

  • 1:崩溃日志
  • 4:卡顿日志
  • 6:启动日志
  • 15:事件日志

返回参数

参数

类型

示例值

说明

err_detail

string

-

错误详情。

data

object of data

-

返回的业务数据。各个接口返回不同,部分接口无此字段。

error_msg

string

-

错误信息。

error_no

int

0

错误码。0为成功。

data

参数

类型

示例值

说明

event_timestamp

int32

1658838421438

事件时间戳。

server_timestamp

int32

1658838423000

服务器时间戳。

label

string

事件分析

显示名称。

type

string

app_event

类型。

header

object

-

上报日志数据header。

data

string

-

数据。

tag

string

null

标签。

raw_log_key

string

[perf_log]event_log_iOS_12345_7fc361f****2b2436

日志密钥。

os

string

iOS

操作系统。

event_id

string

7fc361f****2b2436

事件ID。

issue_id

string

-

issue ID。

crash_type

string

-

崩溃类型。

dump_tos_key

string

-

跳转密钥。

请求示例

POST https://open.volcengineapi.com/?Action=AppTraceLogs&Version=2022-10-12

{
    "id_type": "user_id",
    "id_value": "test_dddd",
    "start_time": 1658811276,
    "end_time": 1658840076,
    "log_types": [
        15
    ]
}

返回示例

{
    "err_detail": "",
    "data": {
        "trace_logs": [
            {
                "event_timestamp": 1658838421438,
                "server_timestamp": 1658838423000,
                "label": "事件分析",
                "type": "app_event",
                "header": null,
                "data": "{\n    \"aid\": \"12345\",\n    \"app_version\": \"1.0.2\",\n    \"dimension\": {\n        \"sdkType\": \"E\"\n    },\n    \"event_name\": \"sdk_event\",\n    \"extraValue\": {\n        \"extra1\": \"extravalue\"\n    },\n    \"inapp_time\": 0.21227025985717773,\n    \"metrics\": {\n        \"sdkVersionCode\": 50203\n    },\n    \"network_type\": 4,\n    \"os_version\": \"15.5\",\n    \"sdk_version\": \"1.0.2\",\n    \"seq_no_type\": 139,\n    \"session_id\": \"92D4139B-A1FE-4FF2-B392-67A29440FD42\",\n    \"timestamp\": 1658838421438,\n    \"update_version_code\": \"1\"\n}",
                "tag": null,
                "raw_log_key": "[perf_log]event_log_iOS_12345_7fc361f****2b2436",
                "os": "iOS",
                "event_id": "7fc361f****2b2436",
                "issue_id": "",
                "crash_type": "",
                "dump_tos_key": ""
            }
        ],
        "control": {
            "next_timestamp": 1658837175000
        }
    },
    "error_msg": "",
    "error_no": 0
}