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

[misc] bump metrics module to 3.4.1
This commit is contained in:
Eric Mc Sween 2020-11-26 11:19:11 -05:00 committed by GitHub
commit 9f32b9f66e
13 changed files with 728 additions and 826 deletions

View file

@ -1,4 +1,4 @@
const Metrics = require('metrics-sharelatex')
const Metrics = require('@overleaf/metrics')
Metrics.initialize(process.env.METRICS_APP_NAME || 'filestore')
const logger = require('logger-sharelatex')

View file

@ -1,6 +1,6 @@
const PersistorManager = require('./PersistorManager')
const FileHandler = require('./FileHandler')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
const parseRange = require('range-parser')
const Errors = require('./Errors')
const { pipeline } = require('stream')

View file

@ -1,4 +1,4 @@
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
const Settings = require('settings-sharelatex')
const { callbackify } = require('util')

View file

@ -1,5 +1,5 @@
const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
const { callbackify } = require('util')
const safeExec = require('./SafeExec').promises

View file

@ -3,7 +3,7 @@ const uuid = require('node-uuid')
const path = require('path')
const Stream = require('stream')
const { callbackify, promisify } = require('util')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
const Settings = require('settings-sharelatex')
const { WriteError } = require('./Errors')

View file

@ -1,7 +1,7 @@
const settings = require('settings-sharelatex')
const persistorSettings = settings.filestore
persistorSettings.Metrics = require('metrics-sharelatex')
persistorSettings.Metrics = require('@overleaf/metrics')
persistorSettings.paths = settings.path
const ObjectPersistor = require('@overleaf/object-persistor')

View file

@ -1,5 +1,5 @@
const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
class RequestLogger {
constructor() {

File diff suppressed because it is too large Load diff

View file

@ -20,6 +20,7 @@
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js"
},
"dependencies": {
"@overleaf/metrics": "^3.4.1",
"@overleaf/o-error": "^3.0.0",
"@overleaf/object-persistor": "git+https://github.com/overleaf/object-persistor.git",
"body-parser": "^1.19.0",
@ -28,7 +29,6 @@
"glob": "^7.1.6",
"lodash.once": "^4.1.1",
"logger-sharelatex": "^2.2.0",
"metrics-sharelatex": "^2.7.0",
"node-uuid": "~1.4.8",
"range-parser": "^1.2.1",
"request": "^2.88.2",

View file

@ -59,7 +59,7 @@ describe('FileController', function () {
'./Errors': Errors,
stream: stream,
'settings-sharelatex': settings,
'metrics-sharelatex': {
'@overleaf/metrics': {
inc() {}
}
},

View file

@ -28,7 +28,7 @@ describe('FileConverter', function () {
FileConverter = SandboxedModule.require(modulePath, {
requires: {
'./SafeExec': SafeExec,
'metrics-sharelatex': {
'@overleaf/metrics': {
inc: sinon.stub(),
Timer: sinon.stub().returns({ done: sinon.stub() })
},

View file

@ -20,7 +20,7 @@ describe('ImageOptimiser', function () {
requires: {
'./SafeExec': SafeExec,
'logger-sharelatex': logger,
'metrics-sharelatex': {
'@overleaf/metrics': {
Timer: sinon.stub().returns({ done: sinon.stub() })
}
}

View file

@ -30,7 +30,7 @@ describe('LocalFileWriter', function () {
fs,
stream,
'settings-sharelatex': settings,
'metrics-sharelatex': {
'@overleaf/metrics': {
inc: sinon.stub(),
Timer: sinon.stub().returns({ done: sinon.stub() })
},