Switch metrics to v2

This commit is contained in:
Christopher Hoskin 2019-01-10 09:11:15 +00:00
parent ed43bd8da6
commit 69a8d9c7f1
2 changed files with 8 additions and 3 deletions

View file

@ -1,13 +1,16 @@
Metrics = require "metrics-sharelatex"
Metrics.initialize("contacts")
Settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
express = require "express"
bodyParser = require "body-parser"
Errors = require "./app/js/Errors"
HttpController = require "./app/js/HttpController"
Metrics = require "metrics-sharelatex"
Path = require "path"
Metrics.initialize("contacts")
logger.initialize("contacts")
Metrics.event_loop?.monitor(logger)
@ -15,6 +18,8 @@ app = express()
app.use Metrics.http.monitor(logger)
Metrics.injectMetricsRoute(app)
app.get '/user/:user_id/contacts', HttpController.getContacts
app.post '/user/:user_id/contacts', bodyParser.json(limit: "2mb"), HttpController.addContact

View file

@ -26,7 +26,7 @@
"coffee-script": "^1.7.1",
"express": "~4.1.1",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.1.0",
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.7.1",
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v2.0.12",
"mongojs": "2.4.0",
"request": "~2.34.0",
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",