Add in metrics

This commit is contained in:
James Allen 2014-05-09 12:44:13 +01:00
parent 24343a38cd
commit c835528dea
2 changed files with 7 additions and 1 deletions

View file

@ -2,13 +2,18 @@ Settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
logger.initialize("track-changes")
Path = require "path"
Metrics = require "metrics-sharelatex"
Metrics.initialize("track-changes")
Metrics.mongodb.monitor(Path.resolve(__dirname + "/node_modules/mongojs/node_modules/mongodb"), logger)
require("./app/js/MongoManager").ensureIndices()
HttpController = require "./app/js/HttpController"
express = require "express"
app = express()
app.use express.logger()
app.use Metrics.http.monitor(logger)
app.post "/project/:project_id/doc/:doc_id/flush", HttpController.flushDoc

View file

@ -7,6 +7,7 @@
"mongojs": "~0.9.11",
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#master",
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#master",
"request": "~2.33.0",
"redis": "~0.10.1"
},