swagger-stats plugin for egg, support cluster.
$ npm i egg-swagger-stats --save
// {app_root}/config/plugin.js
exports.eggSwaggerStats = {
enable: true,
package: 'egg-swagger-stats',
};
// {app_root}/config/config.default.js
exports.eggSwaggerStats = {
};
see swaggerstats.io for more detail.
open browser, navigate to the url below:
metrics: /host:port/swagger-stats/metrics
ui: /host:port/swagger-stats/ui
recommand using prometheus to collect metrics.