mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #200 from overleaf/jpa-bump-metrics-module
[misc] bump metrics module to 3.4.1
This commit is contained in:
commit
8a5858f430
17 changed files with 906 additions and 542 deletions
|
@ -1,4 +1,4 @@
|
|||
const Metrics = require('metrics-sharelatex')
|
||||
const Metrics = require('@overleaf/metrics')
|
||||
const Settings = require('settings-sharelatex')
|
||||
Metrics.initialize(Settings.appName || 'real-time')
|
||||
const async = require('async')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const settings = require('settings-sharelatex')
|
||||
const OError = require('@overleaf/o-error')
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const EventLogger = require('./EventLogger')
|
|||
const HealthCheckManager = require('./HealthCheckManager')
|
||||
const RoomManager = require('./RoomManager')
|
||||
const ChannelManager = require('./ChannelManager')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
let DocumentUpdaterController
|
||||
module.exports = DocumentUpdaterController = {
|
||||
|
|
|
@ -6,7 +6,7 @@ const _ = require('underscore')
|
|||
const OError = require('@overleaf/o-error')
|
||||
const logger = require('logger-sharelatex')
|
||||
const settings = require('settings-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const {
|
||||
ClientRequestedMissingOpsError,
|
||||
DocumentUpdaterRequestFailedError,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
let EventLogger
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const settings = require('settings-sharelatex')
|
||||
|
||||
// keep track of message counters to detect duplicate and out of order events
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
const os = require('os')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
camelcase,
|
||||
*/
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const { EventEmitter } = require('events')
|
||||
const OError = require('@overleaf/o-error')
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable
|
||||
camelcase,
|
||||
*/
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const logger = require('logger-sharelatex')
|
||||
const settings = require('settings-sharelatex')
|
||||
const WebsocketController = require('./WebsocketController')
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
const OError = require('@overleaf/o-error')
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const WebApiManager = require('./WebApiManager')
|
||||
const AuthorizationManager = require('./AuthorizationManager')
|
||||
const DocumentUpdaterManager = require('./DocumentUpdaterManager')
|
||||
|
|
1410
services/real-time/package-lock.json
generated
1410
services/real-time/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -19,6 +19,7 @@
|
|||
"format:fix": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@overleaf/metrics": "^3.4.1",
|
||||
"@overleaf/o-error": "^3.1.0",
|
||||
"@overleaf/redis-wrapper": "^2.0.0",
|
||||
"async": "^0.9.0",
|
||||
|
@ -30,7 +31,6 @@
|
|||
"express": "^4.17.1",
|
||||
"express-session": "^1.17.1",
|
||||
"logger-sharelatex": "^2.2.0",
|
||||
"metrics-sharelatex": "^2.6.2",
|
||||
"request": "^2.88.2",
|
||||
"settings-sharelatex": "^1.1.0",
|
||||
"socket.io": "https://github.com/overleaf/socket.io/archive/0.9.19-overleaf-4.tar.gz",
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('ChannelManager', function () {
|
|||
return (this.ChannelManager = SandboxedModule.require(modulePath, {
|
||||
requires: {
|
||||
'settings-sharelatex': (this.settings = {}),
|
||||
'metrics-sharelatex': (this.metrics = {
|
||||
'@overleaf/metrics': (this.metrics = {
|
||||
inc: sinon.stub(),
|
||||
summary: sinon.stub()
|
||||
}),
|
||||
|
|
|
@ -58,7 +58,7 @@ describe('DocumentUpdaterController', function () {
|
|||
}),
|
||||
'./EventLogger': (this.EventLogger = { checkEventOrder: sinon.stub() }),
|
||||
'./HealthCheckManager': { check: sinon.stub() },
|
||||
'metrics-sharelatex': (this.metrics = { inc: sinon.stub() }),
|
||||
'@overleaf/metrics': (this.metrics = { inc: sinon.stub() }),
|
||||
'./RoomManager': (this.RoomManager = {
|
||||
eventSource: sinon.stub().returns(this.RoomEvents)
|
||||
}),
|
||||
|
|
|
@ -48,7 +48,7 @@ describe('DocumentUpdaterManager', function () {
|
|||
}),
|
||||
request: (this.request = {}),
|
||||
'@overleaf/redis-wrapper': { createClient: () => this.rclient },
|
||||
'metrics-sharelatex': (this.Metrics = {
|
||||
'@overleaf/metrics': (this.Metrics = {
|
||||
summary: sinon.stub(),
|
||||
Timer: (Timer = class Timer {
|
||||
done() {}
|
||||
|
|
|
@ -25,7 +25,7 @@ describe('EventLogger', function () {
|
|||
error: sinon.stub(),
|
||||
warn: sinon.stub()
|
||||
}),
|
||||
'metrics-sharelatex': (this.metrics = { inc: sinon.stub() })
|
||||
'@overleaf/metrics': (this.metrics = { inc: sinon.stub() })
|
||||
}
|
||||
})
|
||||
this.channel = 'applied-ops'
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('RoomManager', function () {
|
|||
warn: sinon.stub(),
|
||||
error: sinon.stub()
|
||||
}),
|
||||
'metrics-sharelatex': (this.metrics = { gauge: sinon.stub() })
|
||||
'@overleaf/metrics': (this.metrics = { gauge: sinon.stub() })
|
||||
}
|
||||
})
|
||||
this.RoomManager._clientsInRoom = sinon.stub()
|
||||
|
|
|
@ -55,7 +55,7 @@ describe('WebsocketController', function () {
|
|||
error: sinon.stub(),
|
||||
warn: sinon.stub()
|
||||
}),
|
||||
'metrics-sharelatex': (this.metrics = {
|
||||
'@overleaf/metrics': (this.metrics = {
|
||||
inc: sinon.stub(),
|
||||
set: sinon.stub()
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue