我正在检查来自浏览器的实际Rollber有效负载数据。 我以前检查过官方文件。但是,它有一些未知数据,如下所示。
有效载荷数据(client
属性的摘录如下):
...
"client": {
"timestamp": 1488857872,
"javascript": {
"language": "ja-jp",
"screen": {
"width": 1920,
"height": 1080
},
"guess_uncaught_frames": true,
"plugins": [{ // What's that?
"name": "AdobeAAMDetect",
"description": "Creative Cloud Desktop Plugin.v_3_0_0_0"
},
{
"name": "Adobe Acrobat NPAPI Plug-in, Version 15.023.20056",
"description": "Adobe\u00ae Acrobat\u00ae Plug-in for Web Browsers, Version 15.023.20056"
},
{
"name": "Default Browser Helper",
"description": "\u30c7\u30d5\u30a9\u30eb\u30c8 Web \u30d6\u30e9\u30a6\u30b6\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3059"
},
{
"name": "Shockwave Flash",
"description": "Shockwave Flash 21.0 r0"
},
{
"name": "Java Applet Plug-in",
"description": "Displays Java applet content, or a placeholder if Java is not installed."
},
{
"name": "WebKit \u5185\u8535 PDF",
"description": ""
}
],
"source_map_enabled": true,
"code_version": "915",
"cookie_enabled": true,
"browser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7"
},
"runtime_ms": 225
},
...
我想清楚client.javascript.plugins
数据来自哪里以及Rollbar如何获取这些数据。
答案 0 :(得分:1)
查看Rollbar javascript库的源代码,您可以看到插件数据来自以下几行:
https://github.com/rollbar/rollbar.js/blob/v2.1.3/src/browser/transforms.js#L83,L98
数据来自插件数组,这是大多数浏览器中导航器对象的属性,c.f。 https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/plugins