mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
b8014fdddf
Implementation use internal eventBus to enable loose counting in the app. read more at https://prometheus.io/ Closes #98
13 lines
357 B
JavaScript
13 lines
357 B
JavaScript
'use strict';
|
|
|
|
const prometheusRegister = require('prom-client/lib/register');
|
|
|
|
module.exports = function (app, config) {
|
|
if(config.serverMetrics) {
|
|
app.get('/internal-backstage/prometheus', (req, res) => {
|
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
res.end(prometheusRegister.metrics());
|
|
});
|
|
}
|
|
};
|