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

Fundebug录屏插件更新至0.5.0,新增domain参数 #210

Open
Fundebug opened this issue Jul 25, 2019 · 0 comments
Open

Fundebug录屏插件更新至0.5.0,新增domain参数 #210

Fundebug opened this issue Jul 25, 2019 · 0 comments

Comments

@Fundebug
Copy link
Owner

Fundebug commented Jul 25, 2019

摘要: 通过配置domain来保证“视频”的正确录制

录屏功能介绍

Fundebug提供专业的异常监控服务,当线上应用出现 BUG 的时候,我们可以第一时间报警,帮助开发者及时发现 BUG,提高 Debug 效率。在网页端,我们通过原创的录屏技术,可以 100%还原 BUG 出现之前用户的操作流程,帮助开发者快速复现出错场景。演示视频如下:地址

其实,我们录制的并不是一个真正的视频!算法经过优化,整个“录制”过程 CPU 的使用率非常低。和传统的视频相比,体积小了成百上千倍。Fundebug 插件“录制”的“短视频”,压缩后的体积只有几十 KB。

感兴趣的话,欢迎大家免费试用~

尊重用户隐私

录屏功能涉及到用户隐私,我们作为第三方服务,也非常重视这一点:

  • Fundebug 默认关闭录屏功能,开发者需要的时候可以自行开启;
  • Fundebug 并不是全程录屏,只会录制 BUG 出现之前 10~20s 的用户操作;
  • Fundebug 提供敏感信息过滤过滤功能,开发者可以过滤掉用户隐私信息;
  • Fundebug 重视数据安全,传输过程全程加密,数据库有多重安全防护
  • Fundebug 会定期(目前是删除 60 天之前的数据)删除过期错误数据,这样既节省成本,也保护用户隐私;

请大家放心使用~

录屏插件更新至 0.5.0

此次插件升级新增了domain配置项,具体内容可参考官方文档

录屏插件默认会获取当前的domain信息,无需主动配置。只有当项目挂载在非根目录下面的时候,才需要主动配置domain属性。

为什么需要配置domain属性呢?

因为所有的静态资源(图片、CSS、JS)的路劲都是相对于项目的根目录,如果插件无法正确获取项目根目录信息,则无法获取静态资源,从而导致录屏失效。

** 如何配置呢?**

我们通过一个例子来解释。 假设 Fundebug 推出一个在线代码静态分析服务,计划将其放在https://www.fundebug.com/static-type-checking/online下。

那么我们需要配置 domain 属性,录屏功能才能正常工作。

<script src="https://js.fundebug.cn/fundebug.revideo.0.5.0.min.js"
            domain="https://www.fundebug.com/static-type-checking/online"</script>

或则:

if ("fundebug" in window) {
    fundebug.domain = "https://www.fundebug.com/static-type-checking/online";
}

如果不配置domain,插件获取的domainhttps://www.fundebug.com。如果有一张图片,本来正确的路径应该是https://www.fundebug.com/static-type-checking/online/static/1.jpg,会被错误的计算成https://www.fundebug.com/static/1.jpg,就会造成图片获取不到,无法正常显示的问题。

接入方法

从 BUG 监控插件 1.7.3版本开始,我们拆分了录屏代码。如果需要使用录屏功能的话,需要单独接入录屏插件。

  • 使用 Script 方式接入

    <script
        type="text/javascript"
        src="https://js.fundebug.cn/fundebug.revideo.0.5.0.min.js"
    />
  • 使用 NPM 接入

    require("fundebug-revideo");

最后,感谢 Fundebug 用户荔枝 FM 的反馈。

参考

关于Fundebug

Fundebug专注于JavaScript、微信小程序、微信小游戏、支付宝小程序、React Native、Node.js和Java线上应用实时BUG监控。 自从2016年双十一正式上线,Fundebug累计处理了10亿+错误事件,付费客户有阳光保险、核桃编程、荔枝FM、掌门1对1、微脉、青团社等众多品牌企业。欢迎大家免费试用!

img

版权声明

转载时请注明作者 Fundebug以及本文地址:
https://blog.fundebug.com/2019/07/24/release_revideo_0_5_0/

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

1 participant