@aligov/arms-report

ARMS 前端监控 的上报模块(不带 ARMS SDK),用于简化 api 在页面中的使用。

安装

$ tnpm i @aligov/arms-report -S

使用

const report = require('@aligov/arms-report');

// report api call status, success or not
report.api(
  apiName,
  successOrFail,
  spendTimeInMilliseconds,
  optionalApiStatusCode,
  optionalMsg
);

// report error information
report.error(errorInstance, optionalErrorPos);

// call retCode api method, argsList are retCode api args that put into list as it's order
report.call(method, argsList);

// setPage
report.setPage(pageName);

// sum
report.sum(key, value);
// avg
report.avg(key, value);

// setConfig info
report.setConfig(configObj);

参考

开发/贡献

DEMO 列表

arms report

import report from '@aligov/components-arms-report';

report.sum('key', 'value');