17

Fundebug:微信小游戏支持监控用户行为

 5 years ago
source link: https://blog.fundebug.com/2018/06/28/wegame-behavior-http-console/?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

摘要:Fundebug的微信小游戏错误监控插件更新至 0.3.0 ,用户行为中新增 HTTP请求console打印

接入插件

接入Fundebug的小游戏错误监控插件非常简单,只需要下载 0.3.0 ,在app.js中引入并配置apikey:

var fundebug = require('./libs/fundebug.0.3.1.min.js')
fundebug.init({
  apikey: "API-KEY"
});

获取apikey需要免费注册帐号并且创建项目。创建项目时语言请选择“微信小游戏”。

另外,还需要将 https://wegame.fundebug.net 添加到request合法域名。

用户行为

目前,Fundebug一共监控2种小游戏用户行为:

  • HTTP请求
  • console打印

如下图所示:

miueYvI.png!web

通过分析出错之前的用户行为,开发者阔以快速复现出错场景,并找到出错原因,从而解决错误。

monitorHttpData:获取HTTP请求的data

出于保护隐私,Fundebug在监控HTTP请求时,不会收集请求的body(即wx.request的data参数)。

如何你希望收集HTTP请求错误的body的话,请将monitorHttpData属性设为true。

fundebug.init({
  monitorHttpData: true
});

这样,用户行为 HTTP请求 将包含请求的body,方便开发者分析BUG。

silentHttp:禁用HTTP请求监控

如果你不希望监控HTTP请求的话,可以将silentHttp属性设为true:

fundebug.init({
  silentHttp: true
});

这样,用户行为中将不会包含 HTTP请求

V36jaib.jpg!web

版权声明:
转载时请注明作者<b><a href="https://fundebug.com" target="_blank" title="Fundebug">Fundebug</a></b>以及本文地址:
<b><a href="https://blog.fundebug.com/2018/06/28/wegame-behavior-http-console/" target="_blank" title="Fundebug:微信小游戏支持监控用户行为">https://blog.fundebug.com/2018/06/28/wegame-behavior-http-console/</a></b>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK