Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

合并上报功能不可用? #3

Open
undead25 opened this issue Apr 10, 2017 · 3 comments
Open

合并上报功能不可用? #3

undead25 opened this issue Apr 10, 2017 · 3 comments

Comments

@undead25
Copy link

/**
 * 默认的配置信息
 * @type {Object}
 */
var defaults = {
  enabled: true,      // 是否可用,关闭以后不再捕获和发送错误信息
  action: true,       // 是否监控并发送用户操作信息
  hook: true,         // 是否增加hook,把setTimeout/setInterval/requestAnimationFrame和add/removeEventListener给wrap一层
  net: true,          // 是否hook ajax请求
  dependence: true,   // 是否发送页面上的依赖库信息,默认会有几个内置流行库的检测,剩余的通过遍历window对象获取
  compress: true,     // 是否压缩提交的数据,使用https://github.com/pieroxy/lz-string 整体性价比兼容性都比较靠谱
  autoStart: true,    // 自动开始,不想自动开始的话就设置成false,然后手动start
  report: {
    delay: 5000       // 报告发送的延迟时间(单位ms),如果一个时间段内有很多报告产生,那么就放到一起发送
  },
  ignoreErrors: [],   // 可忽略的错误
  ignoreUrls:[],      // 可忽略的url,那些产生错误的url
  settings: settings
}

defaults.report.delay,这个参数好像不可用,源码中好像也未提现。是否需要setTimeout

@catalsdevelop
Copy link
Owner

这个功能确实没有实现,实现也简单,参考一下类似很多工具库中类似throttle这样功能的函数。我等有时间把这个项目重新改造一下,现在确实是抽身不开。

@undead25
Copy link
Author

undead25 commented Mar 1, 2018

大佬终于来了,我已经参考 raven 写了一样的东西,并拓展了上报性能 (PerformanceTiming) 信息。也实现了对应的后端 (node, 记录 logstash 格式给ELK 触发邮件,性能信息会入库),没有自己实现protal展现。大佬重新改造可以带我飞。

@catalsdevelop
Copy link
Owner

ui和功能方面,你可以参考下track.js,我觉得他们的产品做的很好,只是收费的。自己模仿一个在内部用,我觉得问题不大。

Repository owner deleted a comment from mkproject-admin Feb 21, 2024
Repository owner deleted a comment from amd119 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@undead25 @catalsdevelop and others