koa2-pm
v1.0.5
Published
*** ### koa2前端监控埋点 > node 模块实现以下数据埋点 * CPU * memory usage * load (1M 5M 15M) * response time * RPS (request per second)
Downloads
9
Readme
koa2-pm
koa2前端监控埋点
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,部署后提供
* appid 为系统所要监控的项目标识,由用户在监控系统注册生成
* YYFAX-APM 监控系统地址 http://172.30.3.79:4430/
* 添加以下代码后,用户可登录监控系统观察前端node项目运行状态
*/
const monitor = new Monitor(app, {
authUrl: "http://172.30.3.79:4430/api/frontEnd/yyfaxapm/node.action?fn=authClient",
appid: "qKzebaqK5C"
});