先创建应用站点-》系统自动生成pid编号-》 下载包( npm install alife-logger --save )-》在main.ts中配置即可。
// main.ts
const BrowserLogger = require('alife-logger')
const __bl = BrowserLogger.singleton({
pid: 'xxxxxxxxxxxxxxx', // 项目Id,新建一个应用站点后,系统自动生成。
appType: 'web',
imgUrl: 'https://arms-retcode.aliyuncs.com/r.png?', // 日志上传地址(官方给的)
sendResource: true, // 是否上报资源数据
enableLinkTrace: true,
behavior: true
})
阿里云监控API使用说明文档:https://help.aliyun.com/document_detail/58655.html?spm=a2c4g.11186623.6.692.4a7e4d29lYuDkc#apihelper
阿里云监测大盘显示:https://arms.console.aliyun.com/retcode/?pid=dqph7prh0s@30408107996b886#/dashboard