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

[misc] bump metrics module to 3.4.1
This commit is contained in:
Jakob Ackermann 2020-11-26 09:55:55 +00:00 committed by GitHub
commit 2afd1fd375
10 changed files with 808 additions and 870 deletions

View file

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

View file

@ -9,7 +9,7 @@
*/ */
const childProcess = require('child_process') const childProcess = require('child_process')
const logger = require('logger-sharelatex') const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex') const metrics = require('@overleaf/metrics')
const _ = require('underscore') const _ = require('underscore')
const OError = require('@overleaf/o-error') const OError = require('@overleaf/o-error')

View file

@ -10,7 +10,7 @@
const ASpellWorker = require('./ASpellWorker') const ASpellWorker = require('./ASpellWorker')
const _ = require('underscore') const _ = require('underscore')
const logger = require('logger-sharelatex') const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex') const metrics = require('@overleaf/metrics')
const OError = require('@overleaf/o-error') const OError = require('@overleaf/o-error')
class ASpellWorkerPool { class ASpellWorkerPool {

View file

@ -1,7 +1,7 @@
const { db } = require('./mongodb') const { db } = require('./mongodb')
const mongoCache = require('./MongoCache') const mongoCache = require('./MongoCache')
const logger = require('logger-sharelatex') const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex') const metrics = require('@overleaf/metrics')
const { promisify } = require('util') const { promisify } = require('util')
const OError = require('@overleaf/o-error') const OError = require('@overleaf/o-error')

View file

@ -1,6 +1,6 @@
const SpellingAPIManager = require('./SpellingAPIManager') const SpellingAPIManager = require('./SpellingAPIManager')
const logger = require('logger-sharelatex') const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex') const metrics = require('@overleaf/metrics')
const OError = require('@overleaf/o-error') const OError = require('@overleaf/o-error')
function extractCheckRequestData(req) { function extractCheckRequestData(req) {

File diff suppressed because it is too large Load diff

View file

@ -24,6 +24,7 @@
}, },
"version": "0.1.4", "version": "0.1.4",
"dependencies": { "dependencies": {
"@overleaf/metrics": "^3.4.1",
"@overleaf/o-error": "^3.0.0", "@overleaf/o-error": "^3.0.0",
"async": "^2.6.3", "async": "^2.6.3",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
@ -31,7 +32,6 @@
"express": "^4.17.1", "express": "^4.17.1",
"logger-sharelatex": "^2.2.0", "logger-sharelatex": "^2.2.0",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"metrics-sharelatex": "^2.6.2",
"mongodb": "^3.6.0", "mongodb": "^3.6.0",
"node-statsd": "0.1.1", "node-statsd": "0.1.1",
"request": "^2.88.2", "request": "^2.88.2",

View file

@ -23,7 +23,7 @@ describe('ASpell', function () {
info() {}, info() {},
err() {} err() {}
}, },
'metrics-sharelatex': { '@overleaf/metrics': {
gauge() {}, gauge() {},
inc() {} inc() {}
} }

View file

@ -20,7 +20,7 @@ describe('ASpellWorker', function () {
info() {}, info() {},
err() {} err() {}
}, },
'metrics-sharelatex': { '@overleaf/metrics': {
gauge() {}, gauge() {},
inc() {} inc() {}
}, },

View file

@ -33,7 +33,7 @@ describe('LearnedWordsManager', function () {
err() {}, err() {},
info() {} info() {}
}, },
'metrics-sharelatex': { '@overleaf/metrics': {
timeAsyncMethod: sinon.stub(), timeAsyncMethod: sinon.stub(),
inc: sinon.stub() inc: sinon.stub()
} }