[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 f79aba7bb1
commit 010fa596e9
5 changed files with 811 additions and 801 deletions

View file

@ -4,7 +4,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('contacts')
const Settings = require('settings-sharelatex')

View file

@ -13,7 +13,7 @@
let ContactManager
const { db, ObjectId } = require('./mongodb')
const logger = require('logger-sharelatex')
const metrics = require('metrics-sharelatex')
const metrics = require('@overleaf/metrics')
module.exports = ContactManager = {
touchContact(user_id, contact_id, callback) {

File diff suppressed because it is too large Load diff

View file

@ -19,11 +19,11 @@
"format:fix": "node_modules/.bin/prettier-eslint $PWD'/**/*.js' --write"
},
"dependencies": {
"@overleaf/metrics": "^3.4.1",
"async": "^2.6.3",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"logger-sharelatex": "^2.2.0",
"metrics-sharelatex": "^2.6.2",
"mongodb": "^3.6.0",
"request": "~2.88.2",
"settings-sharelatex": "^1.1.0",

View file

@ -28,7 +28,7 @@ describe('ContactManager', function () {
ObjectId
},
'logger-sharelatex': { log: sinon.stub() },
'metrics-sharelatex': { timeAsyncMethod: sinon.stub() }
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() }
}
})
this.user_id = ObjectId().toString()