
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
prometheus-plugin-app-info
Advanced tools
Node.js prometheus client plugin for exporting for application and nodejs version.
prometheus-plugin-app-info
Node.js prometheus client plugin for application and nodejs version.
npm i -S prometheus-plugin-app-info
>=prom-client-4.0.0 npm module (installed as peer dependency).
If your project depends on previous version of client this plugin might not work.>=node-4.0.0 because this module uses ES6 syntaxpackage.json file in $PWDconst client = require('prom-client');
const appInfoPlugin = require('prometheus-plugin-app-info');
// start metrics collection
appInfoPlugin.init().start();
// log metrics to console
console.log(client.register.metrics());
// stop metrics collection
appInfoPlugin.stop();
// stop and clear metrics register
appInfoPlugin.reset();
const client = require('prom-client');
const appInfoPlugin = require('prometheus-plugin-app-info');
const override = {
'metric_name': { // provide default metric name to override it's params
type: 'Counter', // could be changed, but it's not recommended
name: 'my_metric_name', // name could be changed
description: 'My custom description', // description could be changed
labelValues: { // additional labels
customLabel: 'hello', // custom labels could be added
customFnLabel: () => { return new Date() } // if it's a function, it will be called to get label value in runtime
}
}
};
// start metrics collection
appInfoPlugin.init(override).start(); // pass override object to init function
// log metrics to console
console.log(client.register.metrics());
// stop metrics collection
appInfoPlugin.stop();
// stop and clear metrics register
appInfoPlugin.reset();
FAQs
Node.js prometheus client plugin for exporting for application and nodejs version.
We found that prometheus-plugin-app-info demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.