1.0.1 • Published 7 years ago

yyfax-monitor v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

yyfax-monitor


yyfax前端监控埋点

node 模块实现以下数据埋点

  • CPU
  • memory usage
  • load (1M 5M 15M)
  • response time
  • RPS (request per second)

example:

const koa = require("koa");
const Monitor = require('koa2-pm');
const app = new koa();   

/*
* authUrl 为监控系统认证url,部署后提供
* id 为系统所要监控的nodeID标识,由用户在监控系统注册生成
*/
const monitor = new Monitor(app, {
    authUrl: "http://localhost:6010/api/yyfaxapm/auth.action?fn=authMonitor",
    id: "2482483c-5baa-455c-ac22-e6094d8063b5"
});
/*
* 引入上述代码后,用户可登录监控系统观察前端node项目运行状态
*/

monitor.js实现以下数据埋点

  • 性能
  • 请求
  • 异常