Merge pull request #33 from overleaf/jpa-bump-metrics-module

[misc] bump metrics module to 3.4.1
This commit is contained in:
Jakob Ackermann 2020-11-25 17:30:07 +00:00 committed by GitHub
commit ec6e8c6ff4
7 changed files with 839 additions and 750 deletions

View file

@ -5,7 +5,7 @@
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
metrics.initialize('notifications')
const Settings = require('settings-sharelatex')
const logger = require('logger-sharelatex')

View file

@ -14,7 +14,7 @@
let Notifications
const logger = require('logger-sharelatex')
const { db, ObjectId } = require('./mongodb')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
module.exports = Notifications = {
getUserNotifications(user_id, callback) {

View file

@ -12,7 +12,7 @@
*/
const Notifications = require('./Notifications')
const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
module.exports = {
getUserNotifications(req, res) {

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@overleaf/metrics": "^3.4.1",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"coffee-script": "^1.12.7",
@ -24,7 +25,6 @@
"express": "4.17.1",
"logger-sharelatex": "^2.2.0",
"method-override": "^3.0.0",
"metrics-sharelatex": "^2.6.2",
"mongodb": "^3.6.0",
"node-statsd": "0.1.1",
"request": "^2.88.2",

View file

@ -29,7 +29,7 @@ describe('Notifications Controller', function () {
requires: {
'logger-sharelatex': { log() {} },
'./Notifications': this.notifications,
'metrics-sharelatex': {
'@overleaf/metrics': {
inc: sinon.stub()
}
}

View file

@ -49,7 +49,7 @@ describe('Notifications Tests', function () {
},
'settings-sharelatex': {},
'./mongodb': { db: this.db, ObjectId },
'metrics-sharelatex': { timeAsyncMethod: sinon.stub() }
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() }
},
globals: {
console