koa-aliyun-monitor
A monitor middleware integrated with koa-monitor and aliyun-monitor
Quick start
准备工作
- 在阿里云监控控制台创建自定义规则,设置字段为
method,url,hostname
- 若要监控响应时间,选择单位为Milliseconds;监控请求次数,选择Count;注意:一个监控项只能监控一个指标
- 记录新创建规则的命名空间为
namespace
,监控项名称为metricName
Example code
const Monitor = ;const Koa = ; let app = ;app; Monitor;Monitor; //Add other all middlewares after this// app.use(some middleware); app;