app日志查询.md
3.77 KB
Home
日志查询
mongo查询接口
-
埋点日志查询
查询结果是分页查询,默认是查询20条每页,最大支持2000条每页, 查询超时时间是5秒,5秒钟mongo没有返回结果则超时
- 请求地址 (GET)
`http://online-api.log.boxfish.cn/log/mongo/api/log/query/condition`
- 请求参数
| 参数 | 类型 | 是否必须 | 备注 |
| ------- | ---- | ------- | ------ |
| userId | long长整型 | √ | 用户标识 |
| event | 字符串 | √ | 事件 |
| startTime | long长整型 | √ | 开始时间 |
| endTime | long长整型 | √ | 结束时间 |
| size | int整型 | × | 返回结构中每页的数量 |
| page | int整型 | × | 页码,从0开始 |
- 返回结果
```json
{
content: [ --查询返回的日志内容
{
id: "ADE2448AAAB638AC-1-156694619D0-200003595",
appKey: "com.boxfishedu.teacher",
userId: "1586759",
deviceId: "14027cf72204aaa2f924c00f19456b4cbc5f3011",
eventId: "1fac9fa9-252e-4922-bd29-75db79ca8fcb",
type: "track",
properties: { ---埋点里的所有属性都在properties里
room_id: "312913222",
sys_app_release: "7.0.0",
sys_screen_height: 768,
video_on: true,
sys_ip: "114.247.25.26",
sys_os: "iPhone OS",
server_receive_time: 1470645019768,
sys_carrier: "UNKNOWN",
attended_room_students: [
"david"
],
event_counter: 54,
service_response_time: 5374,
course_type: "",
sys_lib_version: "1.0.0",
service_id: "1586759",
sys_manufacturer: "Apple",
sys_ios_ifa: "BA19ABAD-DEB3-4604-A5EF-AFD19BB9C4C0",
sys_network: "WIFI",
video_loss_rate: "[LossRate=0.03%, JitRate=61, BR_RECV=50, Pkt=178, Delay=0, Qua(21,10), FreeCnt=2, QuaValid=0] ",
last_modified: 1465808647074,
sys_model: "iPad",
course_id: "L3NoYXJlL3N2bi9Ib3cgdG8gYmVjb21lIHRoZSBjb29sZXN0IGd1eSBhdCBzY2hvb2w_LzAwMS5Ib3cgdG8gYmVjb21lIHRoZSBjb29sZXN0IGd1eSBhdCBzY2hvb2w_Lnhsc3g",
sys_app_version: "824",
course_name: "How to become the coolest guy at school?",
session_id: "6b43e0db-6344-41c8-95ae-d8375decb98f",
sys_screen_width: 1024,
user_login_type: "teacher",
internet_ping: "1129.917860031128",
difficulty: "",
room_students: [
"david"
],
sys_os_version: "9.2",
sys_lib: "iOS",
room_teacher: "1586759"
},
event: "online_course_heartbeat",
appTime: 1470645014751, --app端记录的日志发生时间
sysTime: 1470645017040 --系统收到日志的时间
}
],
last: false,
totalPages: 9,
totalElements: 9,
numberOfElements: 1,
sort: [
{
direction: "DESC",
property: "msg_receive_time",
ignoreCase: false,
nullHandling: "NATIVE",
ascending: false
}
],
first: true,
size: 1,
number: 0
}
```