mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
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>
This commit is contained in:
parent
dcf72148ce
commit
8914df60a9
3 changed files with 162 additions and 6 deletions
4
app.js
4
app.js
|
@ -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)({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue