-
Notifications
You must be signed in to change notification settings - Fork 35
data specification v1
hotoo edited this page May 3, 2013
·
1 revision
用户的每次请求(采样)都会向日志服务器发送请求,用于计算 PV 值。
{
"url": "https://www.alipay.com/",
"ref": "https://www.google.com/",
"sys": "personal",
"client": {
"dev": "pc" // device name.
"os": "Windows/5.2", // operating system name & version.
"scr": "1400x1050x32", // screen size & color depth.
"bro": "Firefox/5.3.6", // browser name & version.
"eng": "Trident/3" // engine name & version.
},
"pv": 1,
"domready":345,
"load": 1060,
"rnd": "random string"
}
{
"url":"https://www.alipay.com/",
"ref": "",
"sys": "cashier",
"client": {
"dev": "pc"
"os": "Windows/5.2",
"scr": "1400x1050x32",
"bro": "Firefox/5.3.6",
"eng": "Trident/3"
},
"htmlSize":1024,
"res":{
"img": ["https://static.alipay.com/logo.gif",
"https://static.alipay.com/a.gif", "https://static.alipay.com/b.gif"],
"css": ["https://static.alipay.com/a.css",
"https://static.alipay.com/min/?path/to/b.css,path/to/c.css",
"https://assets.alipay.com/??path/to/file.css,file2.css,file3.css"],
"js" : ["https://static.alipay.com/a.js", "https://static.alipay.com/b.js"],
"fla": ["https://static.alipay.com/a.swf", "https://static.alipay.com/b.swf"]
},
"rnd": "random string"
}
资源统计&HTML错误的数据格式,有且仅有 1 次发送:
{
"url":"https://www.alipay.com/",
"ref": "",
"sys": "cashier",
"client": {
"dev": "iPhone"
"os": "iOS/5.2",
"scr": "1400x1050x32",
"bro": "Safari/5.3.6",
"eng": "Trident/3"
},
"htmlError":[
{
"ln" : 1,
"err" : 1,
"code" : "<label>no [for=id]</label>"
},
{
"ln" : 2,
"err" : 2,
"code" : "<input type=\"text\" value=\"no [name=name]\" />"
}
],
"rnd": "random string"
}
JavaScript 异常消息数据格式,可能有 0 或多次消息发送:
{
"url":"https://www.alipay.com/",
"ref": "",
"sys": "cashier",
"client": {
"dev": "pc"
"os": "Windows/5.2",
"scr": "1400x1050x32",
"bro": "Firefox/5.3.6",
"eng": "Trident/3"
},
"jsError":{
"ln":1,
"file":"https://static.alipay.com/a.js",
"msg":"n is undefined."
},
"rnd": "random string"
}
JavaScript 异常,每一个脚本报错都实时发送。
{
"url":"https://www.alipay.com/",
"ref": "",
"sys": "cashier",
"client": {
"dev": "pc"
"os": "Windows/5.2",
"scr": "1400x1050x32",
"bro": "Firefox/5.3.6",
"eng": "Trident/3"
},
"constom":{
"type": "log", // log, info, warn, error.
"productLine": "security", // 产品线
"product": "ukey", // 产品名称
"errorCode": "api1-172", // 错误码
"counts": 1 // 可选。错误次数,默认 1 次。
},
"rnd": "random string"
}
SIT:
http://fmsmng.sit.alipay.net:7788/m.gif?encodeURIComponent(data)
线上:
https://magentmng.alipay.com/m.gif?encodeURIComponent(data)
saijs.github.io