diff --git a/services/docstore/app.coffee b/services/docstore/app.coffee index 51f928f1cf..67fc7a14c9 100644 --- a/services/docstore/app.coffee +++ b/services/docstore/app.coffee @@ -1,4 +1,5 @@ Metrics = require "metrics-sharelatex" +Metrics.initialize("docstore") Settings = require "settings-sharelatex" logger = require "logger-sharelatex" express = require "express" @@ -7,7 +8,7 @@ Errors = require "./app/js/Errors" HttpController = require "./app/js/HttpController" Path = require "path" -Metrics.initialize("docstore") + logger.initialize("docstore") Metrics.event_loop?.monitor(logger) @@ -15,6 +16,8 @@ app = express() app.use Metrics.http.monitor(logger) +Metrics.injectMetricsRoute(app) + app.param 'project_id', (req, res, next, project_id) -> if project_id?.match /^[0-9a-f]{24}$/ next() @@ -60,4 +63,4 @@ if !module.parent # Called directly throw error if error? logger.info "Docstore starting up, listening on #{host}:#{port}" -module.exports = app \ No newline at end of file +module.exports = app diff --git a/services/docstore/package.json b/services/docstore/package.json index 849157fb33..a0f43c6770 100644 --- a/services/docstore/package.json +++ b/services/docstore/package.json @@ -26,7 +26,7 @@ "coffee-script": "^1.12.7", "express": "~4.1.1", "logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.4.0", - "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.10", + "metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.12", "mongojs": "2.4.0", "settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0", "underscore": "~1.6.0"