How to use the @pm2/io.metric function in @pm2/io

To help you get started, we’ve selected a few @pm2/io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxindelicato / makerads / server / rest / ads.js View on Github external
cb({ success: false, err: err.message });
    }
  });

  // setInterval(() => {
  //   cache.size((err, size) => {
  //     if (err) {
  //       console.error(err);
  //       return
  //     }
  //     cacheSize = size;
  //   });
  // }, 1000 * 10);
}

io.metric({
  type: 'metric',
  name: 'Cache size (bytes)',
  value: () => {
    return cacheSize;
  }
});
github keymetrics / pm2-elasticsearch / lib / stats.js View on Github external
metrics.forEach(function (metric) {
    // instanciate each probe
    metric.probe = io.metric({
      name: metric.name,
      unit: metric.unit || ''
    })
  })
}

@pm2/io

PM2.io NodeJS APM

Apache-2.0
Latest version published 2 years ago

Package Health Score

74 / 100
Full package analysis

Similar packages