From b7222f38164b232dbcfce2045b44763251c8a126 Mon Sep 17 00:00:00 2001 From: jiarongping Date: Fri, 6 May 2022 17:56:11 +0800 Subject: [PATCH] fix: update uni-stat tables --- .../uni-stat-app-crash-logs/collection.json | 2 +- collection/uni-stat-app-platforms/data.json | 2 +- uni-stat.md | 94 ++++++++++++------- 3 files changed, 62 insertions(+), 36 deletions(-) diff --git a/collection/uni-stat-app-crash-logs/collection.json b/collection/uni-stat-app-crash-logs/collection.json index 70f8456..6683d91 100644 --- a/collection/uni-stat-app-crash-logs/collection.json +++ b/collection/uni-stat-app-crash-logs/collection.json @@ -1 +1 @@ -{"schema":{"bsonType":"object","description":"记录原生应用的崩溃日志","required":[],"permission":{"read":false,"create":false,"update":false,"delete":false},"properties":{"_id":{"description":"ID,系统自动生成"},"appid":{"bsonType":"string","description":"用户端上报的应用ID"},"version":{"bsonType":"string","description":"用户端上报的应用版本号"},"platform":{"bsonType":"string","description":"用户端上报的平台code"},"channel":{"bsonType":"string","description":"用户端上报的渠道code/场景值"},"device_id":{"bsonType":"string","description":"客户端携带的设备标识"},"device_net":{"bsonType":"string","description":"设备网络型号wifi/3G/4G/"},"device_os_version":{"bsonType":"string","description":"设备系统版本"},"device_vendor":{"bsonType":"string","description":"设备供应商 "},"device_model":{"bsonType":"string","description":"设备型号"},"sdk_version":{"bsonType":"string","description":"基础库版本号"},"error_msg":{"bsonType":"string","description":"错误信息"},"use_memery_size":{"bsonType":"int","description":"使用的内存量,单位为Byte"},"app_count":{"bsonType":"int","description":"运行应用的个数"},"webview_count":{"bsonType":"int","description":"打开Webview窗口的个数"},"page_url":{"bsonType":"string","description":"页面url"},"package_name":{"bsonType":"string","description":"原生应用包名"},"create_time":{"bsonType":"timestamp","description":"创建时间"}}},"index":[{"IndexName":"index_search_time","MgoKeySchema":{"MgoIndexKeys":[{"Name":"create_time","Direction":"1"}],"MgoIsUnique":false}}]} \ No newline at end of file +{"schema":{"bsonType":"object","description":"记录原生应用的崩溃日志","required":[],"permission":{"read":false,"create":false,"update":false,"delete":false},"properties":{"_id":{"description":"ID,系统自动生成"},"appid":{"bsonType":"string","description":"用户端上报的应用ID"},"version":{"bsonType":"string","description":"用户端上报的应用版本号。manifest.json中的version->name的值"},"platform":{"bsonType":"string","description":"用户端上报的平台code"},"channel":{"bsonType":"string","description":"用户端上报的渠道code/场景值"},"sdk_version":{"bsonType":"string","description":"基础库版本号"},"device_id":{"bsonType":"string","description":"客户端携带的设备标识"},"device_net":{"bsonType":"string","description":"设备网络型号wifi/3G/4G/"},"device_os":{"bsonType":"string","description":"系统版本:iOS平台为系统版本号,如15.1;Android平台为API等级,如30"},"device_os_version":{"bsonType":"string","description":"系统版本名称:iOS平台与os字段一致;Android平台为版本名称,如5.1.1"},"device_vendor":{"bsonType":"string","description":"设备供应商 "},"device_model":{"bsonType":"string","description":"设备型号"},"device_is_root":{"bsonType":"int","description":"是否root:1表示root;0表示未root"},"device_os_name":{"bsonType":"string","description":"系统名称:用于区别Android和鸿蒙,仅Android支持"},"device_batt_level":{"bsonType":"int","description":"设备电池电量:取值范围0-100,仅Android支持"},"device_batt_temp":{"bsonType":"string","description":"电池温度,仅Android支持"},"device_memory_use_size":{"bsonType":"int","description":"系统已使用内存,单位为Byte,仅Android支持"},"device_memory_total_size":{"bsonType":"int","description":"系统总内存,单位为Byte,仅Android支持"},"device_disk_use_size":{"bsonType":"int","description":"系统磁盘已使用大小,单位为Byte,仅Android支持"},"device_disk_total_size":{"bsonType":"int","description":"系统磁盘总大小,单位为Byte,仅Android支持"},"device_abis":{"bsonType":"string","description":"设备支持的CPU架构:多个使用,分割,如arm64-v8a,armeabi-v7a,armeabi,仅Android支持"},"app_count":{"bsonType":"int","description":"运行的app个数:包括运行的uni小程序数目。独立App时值为1"},"app_use_memory_size":{"bsonType":"int","description":"APP使用的内存量,单位为Byte"},"app_webview_count":{"bsonType":"int","description":"打开Webview窗口的个数"},"app_use_duration":{"bsonType":"int","description":"APP使用时长:单位为s"},"app_run_fore":{"bsonType":"int","description":"是否前台运行:1表示前台运行,0表示后台运行"},"package_name":{"bsonType":"string","description":"原生应用包名"},"package_version":{"bsonType":"string","description":"Android的apk版本名称;iOS的ipa版本名称"},"page_url":{"bsonType":"string","description":"页面url"},"error_msg":{"bsonType":"string","description":"错误信息"},"create_time":{"bsonType":"timestamp","description":"客户端记录到的崩溃时间"}}},"index":[{"IndexName":"index_search_time","MgoKeySchema":{"MgoIndexKeys":[{"Name":"create_time","Direction":"1"}],"MgoIsUnique":false}}]} \ No newline at end of file diff --git a/collection/uni-stat-app-platforms/data.json b/collection/uni-stat-app-platforms/data.json index 48c806f..ee6246d 100644 --- a/collection/uni-stat-app-platforms/data.json +++ b/collection/uni-stat-app-platforms/data.json @@ -1 +1 @@ -[{"name":"App-Android","code":"android","order":1,"create_time":163998979103},{"name":"App-iOS","code":"ios","order":2,"create_time":163998979103},{"name":"Web","code":"h5","order":3,"create_time":163998979103},{"name":"微信小程序","code":"mp-weixin","order":4,"create_time":163998979103},{"name":"百度小程序","code":"mp-baidu","order":5,"create_time":163998979103},{"name":"支付宝小程序","code":"mp-alipay","order":6,"create_time":163998979103},{"name":"字节跳动小程序","code":"mp-toutiao","order":7,"create_time":163998979103},{"name":"qq小程序","code":"mp-qq","order":8,"create_time":163998979103},{"name":"快应用联盟","code":"quickapp-webview-union","order":9,"create_time":163998979103},{"name":"快应用(webview)","code":"quickapp-webview","order":10,"create_time":163998979103},{"name":"快应用华为","code":"quickapp-webview-huawei","order":11,"create_time":163998979103},{"name":"钉钉小程序","code":"mp-dingtalk","order":12,"create_time":163998979103},{"name":"快手小程序","code":"mp-kuaishou","order":13,"create_time":163998979103},{"name":"飞书小程序","code":"mp-lark","order":14,"create_time":163998979103},{"name":"京东小程序","code":"mp-jd","order":15,"create_time":163998979103}] \ No newline at end of file +[{"name":"App-Android","code":"android","order":1,"create_time":163998979103},{"name":"App-iOS","code":"ios","order":2,"create_time":163998979103},{"name":"Web","code":"web","order":3,"create_time":163998979103},{"name":"微信小程序","code":"mp-weixin","order":4,"create_time":163998979103},{"name":"百度小程序","code":"mp-baidu","order":5,"create_time":163998979103},{"name":"支付宝小程序","code":"mp-alipay","order":6,"create_time":163998979103},{"name":"字节跳动小程序","code":"mp-toutiao","order":7,"create_time":163998979103},{"name":"qq小程序","code":"mp-qq","order":8,"create_time":163998979103},{"name":"快应用联盟","code":"quickapp-webview-union","order":9,"create_time":163998979103},{"name":"快应用(webview)","code":"quickapp-webview","order":10,"create_time":163998979103},{"name":"快应用华为","code":"quickapp-webview-huawei","order":11,"create_time":163998979103},{"name":"钉钉小程序","code":"mp-dingtalk","order":12,"create_time":163998979103},{"name":"快手小程序","code":"mp-kuaishou","order":13,"create_time":163998979103},{"name":"飞书小程序","code":"mp-lark","order":14,"create_time":163998979103},{"name":"京东小程序","code":"mp-jd","order":15,"create_time":163998979103}] \ No newline at end of file diff --git a/uni-stat.md b/uni-stat.md index c8550ce..e6cd73d 100644 --- a/uni-stat.md +++ b/uni-stat.md @@ -167,20 +167,33 @@ ### 字段说明 -| 字段名 | 类型 | 默认值 | 说明 | -| :--------: | :-----: |:------------: | :-------------------: | -| _id | string | - | ID,系统自动生成 | -| appid | string | - | 客户端携带的应用ID | -| version | string | - | 客户端上报的应用版本号 | -| platform | string | - | 客户端上报的平台code | -| channel | string | - | 客户端上报的渠道code/场景值 | -| device_id | string | - | 客户端携带的设备标识 | -| uid | string | - | 用户ID, uni-id-users._id,反解客户端请求携带的token获得 | -| session_id | string | - | 访问会话日志ID,对应uni-stat-session-logs._id | -| page_id | string | - | 页面表ID,对应uni-stat-pages._id | -| event_key | string | - | 客户端上报的key | -| param | string/Object | - | 事件参数 | -| create_time | timestamp | - | 创建时间 | +| 字段名 | 类型 | 默认值 | 说明 | +| :--------: | :-----: |:------------: | :-------------------: | +| _id | string | - | ID,系统自动生成 | +| appid | string | - | 客户端携带的应用ID | +| version | string | - | 客户端上报的应用版本号 | +| platform | string | - | 客户端上报的平台code | +| channel | string | - | 客户端上报的渠道code/场景值 | +| device_id | string | - | 客户端携带的设备标识 | +| uid | string | - | 用户ID, uni-id-users._id,反解客户端请求携带的token获得 | +| session_id | string | - | 访问会话日志ID,对应uni-stat-session-logs._id | +| page_id | string | - | 页面表ID,对应uni-stat-pages._id | +| event_key | string | - | 客户端上报的key | +| param | string/Object | - | 事件参数 | +| sdk_version | string | - | 基础库版本号 | +| platform_version | string | - | 平台版本,如微信、支付宝宿主App版本号 | +| device_os | int | - | 设备系统编号,1:安卓,2:iOS,3:PC | +| device_os_version | string | - | 设备系统版本 | +| device_net | string | - | 设备网络型号wifi/3G/4G/ | +| device_vendor | string | - | 设备供应商apple/华为 | +| device_model | string | - | 设备型号iphone8/mate30 | +| device_language | string | - | 设备语言包 | +| device_pixel_ratio | string | - | 设备像素比 | +| device_window_width | string | - | 设备窗口宽度 | +| device_window_height | string | - | 设备窗口高度 | +| device_screen_width | string | - | 设备屏幕宽度 | +| device_screen_height | string | - | 设备屏幕高度 | +| create_time | timestamp | - | 创建时间 | @@ -799,23 +812,36 @@ uni统计发生错误时可以通过该日志排查问题,恢复数据 ### 字段说明 -|字段名 |类型 |默认值 | 说明 | -| :--------: | :-----: |:-----------: | :-------------------: | -| _id | string | - | ID,系统自动生成 | -| appid | string | - | 客户端携带的应用ID | -| version | string | - | 客户端上报的应用版本号 | -| platform | string | - | 平台android\/ios | -| channel | string | - | 客户端上报的渠道code/场景值 | -| device_id | string | - | 客户端携带的设备标识 | -| device_net | string | - | 设备网络型号wifi/3G/4G/ | -| device_os_version | string | - | 设备系统版本 | -| device_vendor | string | - | 设备供应商 | -| device_model | string | - | 设备型号 | -| sdk_version | string | - | 小程序基础库版本号 | -| error_msg | string | - | 错误信息 | -| page_url | string | - | 页面url | -| use_memery_size | int | - | 使用的内存量,单位为Byte | -| app_count | int | - | 运行应用的个数 | -| webview_count | int | - | 打开Webview窗口的个数 | -| package_name | string | - | 原生应用包名 | -| create_time | timestamp | - | 创建时间 | +|字段名 |类型 |默认值 | 说明 | +| :--------: | :-----: |:-----------: | :-------------------: | +| _id | string | - | ID,系统自动生成 | +| appid | string | - | 客户端携带的应用ID | +| version | string | - | 客户端上报的应用版本号 | +| platform | string | - | 平台android\/ios | +| channel | string | - | 客户端上报的渠道code\/场景值 | +| sdk_version | string | - | 基础库版本号 | +| device_id | string | - | 客户端携带的设备标识 | +| device_net | string | - | 设备网络型号wifi\/3G\/4G\/ | +| device_os | string | - | 系统版本:iOS平台为系统版本号,如15.1;Android平台为API等级,如30 | +| device_os_version | string | - | 系统版本名称:iOS平台与os字段一致;Android平台为版本名称,如5.1.1 | +| device_vendor | string | - | 设备供应商 | +| device_model | string | - | 设备型号 | +| device_is_root | int | - | 是否root:1表示root;0表示未root | +| device_os_name | string | - | 系统名称:用于区别Android和鸿蒙,仅Android支持 | +| device_batt_level | int | - | 设备电池电量:取值范围0-100,仅Android支持 | +| device_batt_temp | string | - | 电池温度,仅Android支持 | +| device_memory_use_size | int | - | 系统已使用内存,单位为Byte,仅Android支持 | +| device_memory_total_size | int | - | 系统总内存,单位为Byte,仅Android支持 | +| device_disk_use_size | int | - | 系统磁盘已使用大小,单位为Byte,仅Android支持 | +| device_disk_total_size | int | - | 系统磁盘总大小,单位为Byte,仅Android支持 | +| device_abis | string | - | 设备支持的CPU架构:多个使用,分割,如arm64-v8a,armeabi-v7a,armeabi,仅Android支持 | +| app_count | int | - | 运行应用的个数 | +| app_use_memory_size | int | - | APP使用的内存量,单位为Byte | +| app_webview_count | int | - | 打开Webview窗口的个数 | +| app_use_duration | int | - | APP使用时长:单位为s | +| app_run_fore | int | - | 是否前台运行:1表示前台运行,0表示后台运行 | +| package_name | string | - | 原生应用包名 | +| package_version | string | - | Android的apk版本名称;iOS的ipa版本名称 | +| page_url | string | - | 页面url | +| error_msg | string | - | 错误信息 | +| create_time | timestamp | - | 创建时间 |