mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 22:31:42 +00:00
Update app.coffee to work with Metrics v2
This commit is contained in:
parent
85216fbd34
commit
65e1aba265
1 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
Metrics = require "metrics-sharelatex"
|
||||
Metrics.initialize("track-changes")
|
||||
Settings = require "settings-sharelatex"
|
||||
logger = require "logger-sharelatex"
|
||||
TrackChangesLogger = logger.initialize("track-changes").logger
|
||||
|
@ -23,8 +25,7 @@ TrackChangesLogger.addSerializers {
|
|||
}
|
||||
|
||||
Path = require "path"
|
||||
Metrics = require "metrics-sharelatex"
|
||||
Metrics.initialize("track-changes")
|
||||
|
||||
Metrics.memory.monitor(logger)
|
||||
|
||||
child_process = require "child_process"
|
||||
|
@ -35,6 +36,8 @@ app = express()
|
|||
|
||||
app.use Metrics.http.monitor(logger)
|
||||
|
||||
Metrics.injectMetricsRoute(app)
|
||||
|
||||
app.post "/project/:project_id/doc/:doc_id/flush", HttpController.flushDoc
|
||||
|
||||
app.get "/project/:project_id/doc/:doc_id/diff", HttpController.getDiff
|
||||
|
|
Loading…
Reference in a new issue