1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/routes/backstage.js

14 lines
384 B
JavaScript

'use strict';
const prometheusRegister = require('prom-client/lib/register');
module.exports = function (app, config) {
console.log({config});
if(config.serverMetrics) {
app.get('/internal-backstage/prometheus', (req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end(prometheusRegister.metrics());
});
}
};