1.0.3 • Published 8 years ago
nuxt-pmx-module v1.0.3
:mag: PMX module
Add base pmx http, network and memory metrics to Nuxt.js project
Following metrics are available at pm2 monit command:
pmx:http:latency- request processing time, same as pmxpmx:http:latencymetricHTTP- RPS counter, same as pmxHTTPmetricNetwork Download,Network Upload- default pmx network metricActive handles,Active requests- default pmx network metricmemory:rss,memory:heapTotal,memory:heapUsed- memory usage of the Node.js process from process.memoryUsage()
Motivation
pmx.init({ http: true }) command has to be initialized before Nuxt http server, but there are no Nuxt hooks called before Nuxt server initialization, so we can't use built-in pmx http metric.
Setup
- Add nuxt-pmx-module dependency using yarn or npm to your project
- Add nuxt-pmx-module to modules section of nuxt.config.js
{
modules: ['nuxt-pmx-module'],
}- Start your app with pm2:
pm2 start app.js --name my-fancy-project - Open
pm2 monit: