mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 17:51:51 +02:00
[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:
@@ -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('notifications')
|
||||
const Settings = require('settings-sharelatex')
|
||||
const logger = require('logger-sharelatex')
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
let Notifications
|
||||
const logger = require('logger-sharelatex')
|
||||
const { db, ObjectId } = require('./mongodb')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
module.exports = Notifications = {
|
||||
getUserNotifications(user_id, callback) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
const Notifications = require('./Notifications')
|
||||
const logger = require('logger-sharelatex')
|
||||
const metrics = require('metrics-sharelatex')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
|
||||
module.exports = {
|
||||
getUserNotifications(req, res) {
|
||||
|
||||
1577
services/notifications/package-lock.json
generated
1577
services/notifications/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@overleaf/metrics": "^3.4.1",
|
||||
"async": "^2.6.3",
|
||||
"body-parser": "^1.19.0",
|
||||
"coffee-script": "^1.12.7",
|
||||
@@ -24,7 +25,6 @@
|
||||
"express": "4.17.1",
|
||||
"logger-sharelatex": "^2.2.0",
|
||||
"method-override": "^3.0.0",
|
||||
"metrics-sharelatex": "^2.6.2",
|
||||
"mongodb": "^3.6.0",
|
||||
"node-statsd": "0.1.1",
|
||||
"request": "^2.88.2",
|
||||
|
||||
@@ -29,7 +29,7 @@ describe('Notifications Controller', function () {
|
||||
requires: {
|
||||
'logger-sharelatex': { log() {} },
|
||||
'./Notifications': this.notifications,
|
||||
'metrics-sharelatex': {
|
||||
'@overleaf/metrics': {
|
||||
inc: sinon.stub()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('Notifications Tests', function () {
|
||||
},
|
||||
'settings-sharelatex': {},
|
||||
'./mongodb': { db: this.db, ObjectId },
|
||||
'metrics-sharelatex': { timeAsyncMethod: sinon.stub() }
|
||||
'@overleaf/metrics': { timeAsyncMethod: sinon.stub() }
|
||||
},
|
||||
globals: {
|
||||
console
|
||||
|
||||
Reference in New Issue
Block a user