设置配置信息

设置基本配置信息,此接口需要在app.js首部调用。

monitor.config(data)

参数:

  • data:对象参数,设置基本参数。
{
  beacon: '...', // 数据上传服务器
  key: '', //TINGYUN小程序应用key
  id: '', //TINGYUN小程序账号id 
  sampleRate: 1 //初始采样率
}

示例:

const monitor = require('./agent/tingyun-mp-agent.js');
monitor.config({
  beacon: 'https://beacon-mp.tingyun.com',
  key: '4gA5HRiCw8g',
  id: 'QpKfzsx-PGQ',
  sampleRate: 1
})
© 2007-2023 北京基调网络股份有限公司 all right reserved,powered by Gitbook本文档更新于: 2023-12-27 15:43

results matching ""

    No results matching ""