[misc] bump metrics module to 3.4.1

- renamed package from `metrics-sharelatex` to `@overleaf/metrics`
- drop support for statsd backend
- decaffeinate
- compress `/metrics` response using gzip
- bump debugging agents to latest versions
- expose prometheus interfaces for custom metrics (custom tags)
- cleanup of open sockets metrics
- fix deprecation warnings for header access
This commit is contained in:
Jakob Ackermann 2020-11-25 11:57:24 +00:00
parent 9dd64cd824
commit 9afdb32689
10 changed files with 808 additions and 870 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('spelling')
const Settings = require('settings-sharelatex')

View file

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

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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