mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 23:54:42 -04:00
enhancement(metrics): allow disabling via config option
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
a349ddde56
commit
143864b8d9
6 changed files with 20 additions and 11 deletions
6
app.js
6
app.js
|
@ -75,8 +75,10 @@ app.use(morgan('combined', {
|
|||
}))
|
||||
|
||||
// Register prometheus metrics endpoint
|
||||
app.use(apiMetrics())
|
||||
metrics.setupCustomPrometheusMetrics()
|
||||
if (config.enableStatsApi) {
|
||||
app.use(apiMetrics())
|
||||
metrics.setupCustomPrometheusMetrics()
|
||||
}
|
||||
|
||||
// socket io
|
||||
const io = require('socket.io')(server, { cookie: false })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue