diff options
author | David Mehren | 2021-04-18 13:20:43 +0200 |
---|---|---|
committer | David Mehren | 2021-04-25 20:06:56 +0200 |
commit | 5c70cc021fb1b372e7a54b222e0524e3c6626e02 (patch) | |
tree | 9ac9b478294cc873be5f7c1df003e5bca7290e15 /app.js | |
parent | 8914df60a93c93f48fc7306b5b4edf347474894a (diff) |
Add custom prometheus metrics
This reuses the `realtime.getStatus` method to get the state of the
application state on every prometheus scrape cycle.
Signed-off-by: David Mehren <git@herrmehren.de>
Diffstat (limited to '')
-rw-r--r-- | app.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -26,6 +26,7 @@ const logger = require('./lib/logger') const errors = require('./lib/errors') const models = require('./lib/models') const csp = require('./lib/csp') +const metrics = require('./lib/prometheus') // server setup const app = express() @@ -66,6 +67,7 @@ app.use(morgan('combined', { // Register prometheus metrics endpoint app.use(apiMetrics()) +metrics.setupCustomPrometheusMetrics() // socket io const io = require('socket.io')(server, { cookie: false }) |