Move metrics init to start of app.coffee

This commit is contained in:
Christopher Hoskin 2019-01-02 09:55:31 +00:00
parent 3b6eba33ba
commit 594b403bd3

View file

@ -1,3 +1,5 @@
Metrics = require "metrics-sharelatex"
Metrics.initialize("filestore")
express = require('express')
bodyParser = require "body-parser"
logger = require('logger-sharelatex')
@ -15,8 +17,6 @@ app = express()
if settings.sentry?.dsn?
logger.initializeErrorReporting(settings.sentry.dsn)
Metrics = require "metrics-sharelatex"
Metrics.initialize("filestore")
Metrics.open_sockets.monitor(logger)
Metrics.event_loop?.monitor(logger)
Metrics.memory.monitor(logger)