diff options
author | David Mehren | 2021-04-18 12:31:28 +0200 |
---|---|---|
committer | David Mehren | 2021-04-22 23:19:34 +0200 |
commit | 8914df60a93c93f48fc7306b5b4edf347474894a (patch) | |
tree | 521a2ddd4f2a31c8bfb2e98d9ac9e9a36385cb64 /app.js | |
parent | dcf72148cebd817399fc0e6067709281fdf2dac9 (diff) |
Add prometheus endpoint at /metrics
This is currently just using the default metrics of prometheus-api-metrics.
Signed-off-by: David Mehren <git@herrmehren.de>
Diffstat (limited to '')
-rw-r--r-- | app.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -18,6 +18,7 @@ const passportSocketIo = require('passport.socketio') const helmet = require('helmet') const i18n = require('i18n') const flash = require('connect-flash') +const apiMetrics = require('prometheus-api-metrics') // core const config = require('./lib/config') @@ -63,6 +64,9 @@ app.use(morgan('combined', { stream: logger.stream })) +// Register prometheus metrics endpoint +app.use(apiMetrics()) + // socket io const io = require('socket.io')(server, { cookie: false }) io.engine.ws = new (require('ws').Server)({ |